Agreed that solar is the logical way to go, it is just not a viable market based solution.
Solar is a distributed energy source, and not easy to monopolise – no profit for large corporations.
Oil is easy to control, and extract huge monopoly rents from.
There is no way to make a market system give up oil without driving the masses into poverty (within the natural incentive structures of the market).
In order to solve this, and many other problems, we need to go beyond scarcity based competitive market values, and embrace universal abundance, sanctity of sapient life and liberty, and cooperation as what is actually in our own long term self interest.
Certainly there are many possible technologies. Hydrogen is certainly one, and it comes with many problems and risks. Splitting hydrogen and oxygen results in two gases at the perfect ratio for a major explosion. Hydrogen is really difficult to contain, it leaks out of most things. So yes, has potential, and also much risk.
Lots of potential battery technologies with far lower risk profiles.
Then there are mechanical systems, like pumping water back uphill into high storage lakes every day.
Large flywheels can store a lot of energy, and also do a lot of damage if they break free in an earthquake.
No simple and universally applicable answers at this stage.