Where would you get the energy to split the water? Why not just use that energy directly :).
The idea is to use the water as an energy carrier. You split the water into H2, than use that to power a car producing water as the only output.
From a battery.
They definitely do not work by using a depleted battery to charge a second battery to create energy out of nothing.
The original poster was proposing a closed system where you would turn water into hydrogen (a very energy intensive process) and then turn it back into water (an energy releasing process) inside the car to provide all the energy. This is not how physics works. You cannot use your energy source to create more of your energy source without an external energy source. It just doesn't work that way.