First law of thermodynamics: you will get as much energy out as you put in.
Second law of thermodynamics: you will always get less USEFUL energy out than you put in.
That second law is the important one where engines are concerned. Fuel is chemical energy stored in a useful form but if you burn it you end up with the lowest grade of energy which is heat. There is no way to turn it all back into the high grade kinetic energy you want and so you throw most of it away. AdamW says you throw away 80% and I can believe it.
The fuel cell is a great improvement on the heat engine because it turns chemical energy directly into high grade electrical energy. Moreover, hydrogen is a very clean fuel - the exhaust is pure water - but the question remains, where do you get it. On this planet you are most likely to get it from water. Environmentalists should approve of that bit. You start with water and you finish with water. The problem lies with that other ingredient you have to put in, namely energy.
A good old fashioned way of splitting water is to pass it over hot carbon. The result, a mixture of hydrogen and carbon monoxide, was known as water gas but here we have a double whammy: where do you get the carbon and what do you do with all that nasty CO? As if that isn't enough, the reaction is endothermic; you have to put heat in as well. The old solution to this was to alternate the water with air. This exothermic reaction made producer gas (mostly CO) and bumped up the temperature ready for the next batch of water. Look carefully at this process and you'll see that all you're really doing is burning carbon!
So what happens if we simply heat up water vapour until the molecules split? That's OK in theory. It happens at about 6000 degrees!! Centigrade or Kelvin? - who cares. I can imagine waste heat from a fusion ring being used for this purpose but that isn't going to happen anytime soon. Neither is it practical to import hydrogen from Jupiter.
The real answer is of course electrolysis and so we come to the real question. How do we generate the electricity to make the hydrogen to put in the fuel cells that will power our electric cars? Conventional power stations burn fuel to make heat to drive heat engines - and most of the energy gets thrown away. You might as well burn the fuel in the car but how do you make the fuel in the first place?
I know I've said this before but I'll repeat it anyway. There are only three sources of energy available to us: solar power, geothermal power and tidal power. In the far distant future we might figure out how to tap the ultimate power source which is gravity. As every Trekky knows, Romulan engines are powered by an artificial quantum singularity. In simple terms you make a diddy little black hole and drop stuff in. It's a great way to get rid of rubbish but there is a problem and it's not just that we don't know how to make one. As every Trekky also knows, those things can never be shut down. Would you want one in your town?
Getting back to life as we know it ---
As AdamW points out, there are many ways, mostly solar in origin, to generate 'clean' electricity which could be used to make hydrogen. Unfortunately they're not exactly compact. One way of generating huge amounts of electricity is to cover huge areas of the Earth's surface with solar cells. But this is looking at the problem the wrong way. Why not split OXYGEN from water and see what's left? The advantage to this method is that everything we need to do it is already out there - and has been for 600 million years!
Instead of hydrogen powered cars we should be looking at alcohol powered cars. Plants make sugars from water, CO2 and light. Fungi turn sugar into alcohol. OK so they both take a little of the energy for themselves but that's the way it goes. Remember the second law?
Alcohol is a very clean fuel. The exhaust is water and CO2 but no more than the plants took in the first place. As with hydrogen you can drink the exhaust and what's more, unlike hydrogen, you can also drink the fuel!
PS: The day may come when we have to import hydrogen from Jupiter. If the human population continues to grow we will run out of the stuff. We will end up with a monolithic city many miles thick covering the entire planet's surface. What do we do when the oceans have run dry? We could try splitting silicon and oxygen atoms but we'll need that Romulan technology to do it because nuclear fusion won't work.
PPS: What do we do when we've cleaned out Jupiter - and all the other gas planets? Time for a rethink on birth control perhaps!