If you create a currency, you can decide how it works.
Suppose you create an electricity trading system - i.e. a big substation with lots of high voltage wires going in and out and an electricity meter on each wire. (I'm sure it's more complicated than that, but that's the principle)
Now since it's your system you get to decide how it works. You can make a database of balances and you can say that anyone who supplies 1 MWh of electricity gains 1 token, and anyone who uses 1 MWh of electricity loses 1 token.
Verification is easy, you just check the energy meters. Tying the value to electricity is easy, you've done it by definition.
Ta-da, this is now the currency you want.
But you still have significant problems to overcome. For one thing, the grid doesn't store electricity - at least not in any significant quantity (it stores a little bit). People have to produce and consume it at the same time. So what happens when a power plant shuts down and more people want to consume than produce? Or on a sunny windy holiday when more people want to produce than consume? Some of them can't?
Even if you build a big battery station or pumped hydro station attached to your exchange, you'll still end up printing infinite amounts of currency over time, because the energy loss in your storage system will still give the producer a token, but nobody will ever consume that token because the energy was lost.
The value of electricity fluctuates based on market conditions. Does that mean a loaf of bread is worth 2 microtokens in the middle of the night, but 0.5 microtokens in a hot afternoon when everyone's got their air conditioning on? The value is not as stable as you would like. You would rather adjust the price of the electricity, than the price of the bread.
It's also not decentralized. And it probably can't be. Energy has different value at different locations. 1 MWh at Niagara Falls is much cheaper than 1 MWh in New York City. Normally, some wealthy oligarch would pick up on this and build a power line from there to here, and make a profit based on the price difference, while also providing the useful service of moving electricity (that's the core tenet of capitalism). But if you force them to be the same price, that doesn't happen.
To see the difficulties involved in running an effective currency like this, you may be interested to read about the Capitol Hill Babysitting co-op.