In a solar photoelectrochemical process, hydrogen can be produced by electrolysis. To use sunlight in this process, a photoelectrochemical cell can be used, where one photosensitized electrode converts light into an electric current that is then used for water splitting. One such type of cell is the dye-sensitized solar cell. This is an indirect process, since it produces electricity that then is used to form hydrogen. Another indirect process using sunlight is conversion of biomass to biofuel using photosynthetic organisms; however, most of the energy harvested by photosynthesis is used in life-sustaining processes and therefore lost for energy use.
A semiconductor can also be used as the photosensitizer. When a semiconductor is hit by a photon with an energy higher than the bandgap, an electron is excited to the conduction band and a hole is created in the valence band. Due to band bending, the electrons and holes move to the surface, where these charges are used to split the water molecules. Many different materials have been tested, but none so far have shown the requirements for practical application.