Hydrogen is not an energy source, unlike nuclear, coal, wind or sunlight. It does not exist on its own in nature, but requires energy to extract it. At the moment the majority (95%) is made by reduction of methane by carbon, resulting in use of energy and emission of a lot of CO2, thus is fossil fuel reliant and is a greenhouse gas emitter. Electrolysis of water is often cited as a convenient and CO2-free source. To make 1 kg of hydrogen, about 40 KWH equivalent of electricity, takes 50 - 55 KWH of electricity. Thus you are much better off putting this directly in your car or home battery. And while the bulk of electricity is produced unsustainably and with CO2 emissions, this is even more stupid.
The situation is indeed changing rapidly at least in the UK and Western Europe, to renewable sources. When this is further along it could be sensible to introduce electrolytic hydrogen as a portable fuel. The use of hydrogen is in transporting energy, not in generating it.
There are two areas where this could be very appropriate. One is in domestic and industrial gas supply, which is a very large source of CO2 emissions nationally. The gas network is OK for hydrogen, in fact the old "town gas" was largely hydrogen (plus poisonous CO). It is also an enormous energy storage system, easily able to iron out peaks and troughs in electricity demand. In Germany it is estimated to be around 200,000 GW, i.e. about 100 power stations, and gas pipelines are cheaper than electricity cables for energy distribution.
The other area is in heavy movers: lorries, trains etc. It looks as if hydrogen storage (essentially highly explosive tanks!) plus fuel cells could be an economic solution, along with renewable energy to make the hydrogen. Quite probably ammonia could be a better solution with lower risks, but the economic and renewable argument is pretty similar. In contrast, battery technology still needs some development before it is appropriate and economical for these big applications, though development is now pretty rapid.
These all require further development of fuel cells. These do exist but are more expensive than IC engines at the moment. I expect this will change.
Whilst hydrogen can be used to fuel an IC engine, you immediately lose at least half the efficiency (hence range).
I expect to see battery technology dominant in small-to-medium size transport in the next 5 - 10 years, with hydrogen/ammonia competing in the heavier sector at first then competing at smaller scales later. It is a requirement of both that zero or very low emission energy sources first become the dominant national electricity supply.
The hydrogen distribution network is well established in gas mains, but local stations to compress/liquefy hydrogen and distribute it to the user are pretty complicated and very expensive at present (millions rather than tens of thousands). Far cheaper to build a charging network through the grid.
Source:
https://en.wikipedia.org/wiki/Hydrogen_economy, which is a very good read.
Looking forward to my Leaf coming next week!