Photogeneration of hydrogen