This does actually work when done properly. The use of electrolysis to separate plain water (H2O) into Hydrogen (H) and Oxygen (O), is nothing new. Oxygen is necessary for combustion to occur inside any engine. And Hydrogen just happens to be a highly volatile gas, which will only add more "fuel to the fire" so to speak if its fed into the intake of your engine.
People don't do it because most people don't know about it. This is very dangerous stuff though. First of all mixing electricity with water, and creating flammable gases in the process, then feeding it into an engine... where there's fire.