When a semiconductor absorbs photons with energy greater than its band gap, electrons are excited from the valence band to the conduction band, leaving behind holes in the valence band. These electron-hole pairs can migrate to the surface and participate in oxidation-reduction reactions, driving the catalytic process.