All green plants do this via photosynthesis. They use sunlight to split water into Hydrogen and Oxygen. The plants want to keep the Hydrogen to make carbohydrates and release the Oxygen back into nature.
Right now, hydrolysis--breaking up water molecules--requires more electricity than it's worth. But if we can ever imitate plants with a semi-efficient way to use sunlight to break out Hydrogen from water (and release Oxygen as a byproduct) it would be world-changing.
Not quite correct. What is really the case is that "currently" (no pun intended), the cost of the necessary electricity is too high. If the cost of photovolataic cells drops enough, then electrolysis is a feasible option.