For transportation needs, a portable energy source is obviously needed. Some forms of transport, such as automobiles, can run effectively directly on electricity, which they may obtain from the grid, and then store on board in batteries.  Other forms of transport cannot employ this approach.

It is in these latter cases that hydrogen fuels may play a productive role.  Hydrogen is not an energy source.  Rather, energy must be used to produce useful forms of hydrogen.

On the other hand, with unlimited supplies of inexpensive electricity on hand, it is clear that hydrogen can  readily be made by electrolysis of water.  This releases pure oxygen as its only (and desirable) byproduct.

This hydrogen can then be used to power autos, trucks, trains and the like.  This leaves only a small number of cases where higher energy storage density is essential, such as in the case of aircraft, where fossil fuels may still have to be used.  Such a small usage of fossil fuels is considered acceptable.  One could also consider using carbon neutral fuels such as Ethanol or BioDiesel in these cases.

Note that it has already been demonstrated elsewhere that neither Ethanol or BioDiesel can be used as the primary transportation fuel, in place of hydrogen, since it is manifestly impossible to produce enough such fuel with the available farmland and other resources.