When semiconductors absorb photons with energy equal to or greater than their bandgap, electrons are excited from the valence band to the conduction band, creating electron-hole pairs. These pairs can migrate to the surface of the semiconductor where they participate in oxidation and reduction reactions. For instance, in water splitting, the excited electrons reduce protons to hydrogen, while the holes oxidize water to oxygen.