I presume I'm missing something, but your question is remarkably brief. Of course you can liberate H2 from the water and burn that (assuming your consideration is a vehicle driven by a heat engine), but if you calculate the energy needed for electrolysis or whatever other method you use to generate your H2 from water, you'll see you need more than is practically generated by the engine when running on the liberated H2. So the longer answer is: it just isn't a viable solution.
Hydrogen is a component of water (H2O), which can be used to create hydrogen gas (H2). "Electrolysis" is the process of converting water molecules into oxygen and hydrogen gas using electricity. We turn electrical energy into hydrogen gas, a fuel that may be stored, through electrolysis. However, according to fundamental scientific principles, an internal combustion engine typically burns gasoline to generate energy inside its chemical bonds, producing pollutants like carbon dioxide. However, since water cannot burn, you cannot use it in place of gasoline in an engine.
It is still a possibility that one day, cars will run on water, however, before then the process of making water combustible through the liberation of its constituents (H2 and O2) have to be economically viable. Infact at that stage, it is possible to recycle the water for continuous production of power since the end product of the combustion of the constituents will still be water.
But at the moment, the technology for the electrolysis ofwater to produce combustible products is still very energy intensive making it a no no option.