WATER = 2xH2+1xO2, - so plenty of the stuff. Seperating is easy, with an electrical current. Hell, you can even split water with a Battery.
Storing it is another thing, - a lot worse than Gasoline, but not a lot worse than other "floating" Gases, - so in short, quite doable.
Converting energy into it is anbother thing, - a lot gets lost on the way, but NO MORE THAN RUNNING YOUR CARS ON GASOLINE, - i.e. to convert gasoline to electricity via Power plant, then the Elctricity to Hydrogen, then run your car on it, looses roughly the same amount of the original energy as tanking your cars on the gasoline in the first place. Reason: Powerplants are a lot more effective than small car engines.
However, even with the energy useage on pair, the benefit of a Hydro car is significant, - NO POLLUTION, - no soot, no lead, no CO2, no CO, etc. etc. etc.
Since there are swings in power (Electrical) usage on a 24 hr. scale etc, some surplus power can be used to produce Hydrogen, although much of those power swings are overcome in different ways (Dams, shutting fuelled generators of, etc, etc). But mostly, mankind would have to produce Hydrogen from a renewable source, such as Sunlight, Hydro power, or Bio Power.
Now there is something that is rarely mentioned, - Growing Power.
The Brazilians have been running their cars on Alcohol for a long time, - producing the juice from their own biomass. The engines have to be converted, but not much I belive. (carburettor mostly). I don't know about power output, but it probably drops some.
Another Biomass would be oilseed. Squashed Rape-seed produces oil that runs straight away on a diesel engine, - with about 10% power loss, lots of soot and short-living injection heads as a negative effect though. It can however be mixed with diesel, and also it would be burnable on larger scale powerplant with ease (oil turbines).
With large agricultural aereas unused on many places in the world, there is quite much we can do with this, - a possible benefit for the rural areas of Europe and the USA, and a drawback for the Arab states,,,,,,,