When you boil it down to its essentials, there are three basic problems:
1) How do you create energy?
2) How do you store energy?
3) How do you change energy from one form to another?
The answer to the first is pretty simple - either nuclear fission here on earth, or nuclear fusion in the sun. With the possible exception of geothermal, I don't think there are any other significant sources.
The second two are tied together. Storing energy is a big problem. If you want to store it for a long time and carry it around with you, a reversible chemical reaction is about the only way to go. Plants to a horribly inefficient job by using fusion-derived energy to break apart carbon dioxide into carbon and oxygen. Us wood-burners can carry around that latent chemical energy, store it, and release it by reversing the reaction in our woodstoves.
Solar cells generating electricity to break water apart into oxygen and hydrogen is a similar process. More efficient than plants, but MUCH more expensive. Hydrogen is a b*tch to store and carry around, too.
You could also store energy as potential kinetic energy. If you use energy to lift something, you get the energy back when you let it fall. They built a huge hydro plant in Northfield Massachusetts that would pump water from the Connecticut river to a lake up on a mountain. When they needed electricity, they let it flow back down through turbines to generate power. A giant battery, if you want to think of it that way.
Some smart people are playing with artificial photosynthesis - using sunlight to directly produce a reversible chemical reaction.
Automobile engines are just really complicated devices for transforming chemical energy into kinetic energy (motion). Electric motors are much simpler and more efficient IF you have electricity available. Of course, you have to make the electricity....
Energy density is another dimension. One of the attractive things about gasoline / diesel fuel is that it's easy to transport and carries enormous energy per pound and per cubic foot. Batteries, hydrogen, and other techniques don't come close at this point.
Fusion based energy in the form of sunlight is also very low density. It would take a LOT of panels to create the same amount of energy that's stored in a tank of gas - especially up here where the sun is low in the sky this time of year and it's cloudy a lot.
I meet 100% of my hot water needs in the summer with solar panels. After mid-October, I drain them - there's almost no usable energy to be had.
That leaves me with only two choices - stored fusion energy (I have a pile of it under my deck), or fission energy from my neighborhood nuclear plant. Note that coal and hydro plants are just converting stored solar energy. In the case of hydro, the heat from the sun causes water to evaporate and rise up into the atmosphere. When it falls down, some of it lands at high elevation where we can exploit its potential energy.