Here's the problem with synthesizing hydrogen for fuel from water: you get less energy out of the hydrogen than you put in to the hydrolysis reaction to get it out in the first place. Theoretically, if we set up small solar/wind/hydro powered machines at gas stations all over the world it could work, but we'd need to actually agree on something, and we all know that's not going to happen.
Regardless, Audi has come up with a rather interesting machine. This new A3 TCNG eGas concept has an engine that can run on natural gas, synthesized from water and carbon dioxide, or gasoline, and if filled up with both has a range of 745 miles. Given that natural gas stations can be hard to find, this seems like a great idea.