MIT has recently developed an "artificial leaf" that uses sunlight to split water into hydrogen and oxygen. This can easily be converted back into electricity.