The key here is to do it in a cost effective way, as breaking water into H2 and O2 via electrolysis is school-textbook chemistry. Fuel cell techology that can store H2 and oxidize it to produce energy is also available.
The MIT project is to create an "artificial leaf" that can take the abundant (and free) solar energy and mimic the photosynthesis reaction that happens in plants for water splitting. More on it here:
http://web.mit.edu/newsoffice/2011/a...leaf-0930.html
It is yet to be seen if these artificial leaves can be produced and used in a commercially effective way.