One of my readers tells me that food is the ultimate form of energy. I have to disagree -- food is great for powering humans and animals, but the ultimate form of energy is electricity. I can generate electricity from almost any kind of other energy, and I can power pretty much any mechanical system with it. Electricity is the ultimate flexibility. I can even make food with it, via a lamp-powered greenhouse. (Yes, for the moment it's better to use the sun. Sunlight is free. Plants only need light for half the day, and there's currently enough space on the surface to grow our food. This will change if we move because of overcrowding to the deep ocean, the underground, or deep space.)
However, there are losses. Grid electricity is brought to homes and businesses via high voltage lines to minimize losses, but only 1/3rd of it makes it through on average. Power plants must make 3 watts for every watt used.
So a big advantage of generating your own power is reducing these losses. When I generate 100 watts via a solar panel on my roof, not only does this spare the local power plant the need to generate these 100 watts, but also the 200 watts that would have been lost to heat via resistance. If I generate more than I need, I can also power my neighbor's house, and there will be some lost, but less than if the power came from the power plant. (Because I'm closer. Less lines, less resistance.)
The ultimate grid would be very distributed, with many sources of power near the users of power, and the ability to move excesses about until they are all used.
It also pays to use less power in the first place. Replace old appliances with newer ones that are more efficient. Replace appliances with "phantom draw." (Old appliances often use power if plugged in, even if off. Newer ones have minimized or even eliminated this.)
Less power used can also mean greener sources. All the humans on the earth now use 15TW of power, which pretty much guarantees we have to use either fossil fuels (which smoke and are full of carbon), or nuclear (which immensely frightens people.) If we, through greater device efficiency, reduced this to 10TW, and built a solar panel on every building, we could probably do this with entirely solar, wind, hydroelectric and tidal power. No more coal, no more nuclear waste. Much more batteries, though, which has their own problems.