Yes, hydrogen explodes when it is a gaseous, but so does gasoline. In fact, gasoline explodes more violently then hydrogen. The breaking of the carbon-carbon and carbon-hydrogen (yes, gasoline contains hydrogen) bonds and the eventual formation of carbon dioxide, carbon monoxide and water releases more energy then the breaking of the hydrogen-hydrogen bond in molecular hydrogen does.
So, since it seems that gasoline releases more energy then hydrogen, there would be no reason to switch to hydrogen, correct?
First of all, the byproducts of burning gasoline, which is what a engine does, are in order of quantity: Carbon Dioxide (poisonous, green-house gas), Carbon Monoxide (very poisonous) and Water (very little). The method that fuels cells, the proposed alternative to internal combustion engines, would use to power your car would produce one byproduct, water.
Fuel cells also have a few other advantages:
1. They produce their energy as electricity, not rotational motion.
2. They run quiet.
3. Hydrogen is the most plentiful element in the universe. Look up at the sun, a giant ball of hydrogen...
But they also have some issues:
1. Fuel cells are expensive
2. Hydrogen is a gas at normal temperature and pressure, so it has to be condensed to a liquid to be easier to work with. (Hydrogen becomes a liquid at -252.87 °C, -423.17 °F, just 20 degrees above absolute zero)
3. Despite how common it is, it is hard to isolate hydrogen, it require less energy to refine a similar amount of gasoline, and you will get the more energy out of the gasoline.
So both gasoline and hydrogen have their plusses and minusess, it's just that we're running out of gasoline...
Whoops, not exactly a short answer, but I hope it answered the question...
I could stand to see Texas succeed from the US