The photovoltaic effect converts incident photon energy directly into electrical energy within semiconductor p-n junctions. Photons possessing energy greater than the bandgap E_g excite valence band electrons into the conduction band, generating electron-hole pairs. The built-in electrostatic field across the space-charge depletion zone separates opposite charges, driving a net photocurrent according to the Shockley diode equation.