How much energy fits in your "tank"?
I'm brand new but had to jump in because I haven't seen mentioned what is the barrier very few people talk about: ENERGY DENSITY. It's not as sexy as generating or using fuel, but it is the current barrier that is limiting electric cars and still leaves Hydrogen off of any businessperson's radar.
One thing to understand about gasoline and diesel (and all liquidized fuels) is that they are amazingly well suited for being fuels. They are liquids that easily vaporize into gases. To start with the latter, gases burn very quickly (actually related to the concept of power density). The liquid part is what we take for granted. Easy to transport and pretty much all the space they take up is taken up by reactants that will be burned/converted into energy. You simple can't cram more molecules into a space than a liquid and in this case all those molecules will convert bonds into energy. (solids are often more dense but only by a small amount).
The key term for this is ENERGY DENSITY--how much energy you can harvest per volume--and it is very hard to beat liquid fuels. Batteries have a major problem in the fact that a huge proportion of their volume is not converted into energy. Membranes, electrodes, electrolytes do allow for energy production but take up space without actually being converted into energy. The end result is that current batteries are barely scratching their way to 1/10 the energy density of liquid fuels. So the weak 50mile range of electric cars can easily be solved with battery packs 10x the size of a typical gas tank :-/
Hydrogen is even worse because it is a gas and it cannot, within reason, be liquefied by any amount of pressure placed on it. So consider a very rough calculation here... a gallon of gas ends up being about 30moles of molecules (all of which by the way have a lot more bonds than each H2). A mole of gas is ~22L at normal pressure, we'll call it 20qts and so 5 gallons per mole. So we're looking at a gallon of liquid fuels having the energy of about 150 gallons of the gas version. Yes, you can compress the H2 gas, but doing so it will be at >2000psi and you will still only have 1 bond per molecule to break vs. 20 on average for gasoline. (It is not intuitive, but in a gas the size of the molecule does not really affect how much space the gas takes up. It is just the number molecules bouncing around) To be honest those pressure are not beyond reason, but there are other issues at play and such tanks are very heavy.
Gaseous hydrocarbons have seen success but LPG is actually liquefied and CNG has the same issues as H2. CNG is helped by the multiple bonds issue, but CNG still produces CO2 and you've all seen the almost-second story bump on CNG buses. All cars converted to CNG give up their trunks, though concept vehicles have other solutions.
A very interesting line of research going on with H2 though is to make solid state materials that can store H2 within their very crystal lattice. Like a sponge where the spaces between the host materials atoms has room for H's to hang out. These can take the pressures down by a factor of 10 or so.
All told a long-range H2 car still needs to haul a tank behind it heavier than it could realistically do. Batteries will always have the "wasted" space of the elctrodes and such. Nothing will go anywhere further, pun intended, unless energy storage volumes are addressed.