Functional principle of a silicon solar cell in a photovoltaic system. Silicon is a semiconductor. The special feature of semiconductors is that free charge carriers can be generated in them by supplied energy (e.g. electromagnetic radiation).[1] (Ideas for the graphic inspired by the description by Lewerenz, Jungblut 1995[2])
(1) The upper silicon layer is interspersed with electron donors (e.g. phosphorus atoms) - negatively doped. There are too many electrons here (n-layer).
(2) The lower silicon layer is interspersed with electron acceptors (e.g. boron atoms) - positively doped. Here there are too few electrons, i.e. too many defects or holes (p-layer).
(3) In the border region of the two layers, the excess electrons of the electron donors bind loosely to the vacancies of the electron acceptors (they occupy the vacancies in the valence band) and form a neutral zone (p-n junction).
(4) Since there is now a lack of electrons at the top and a lack of vacancies at the bottom, a constantly present electric field forms between the upper and lower contact surfaces.
(5) Photons (light quanta, "sun rays") enter the transition layer.
(6) Photons with sufficient energy transfer their energy in the neutral zone to the loosely bound electrons in the valence band of the electron acceptors. This releases these electrons from their bond and lifts them into the conduction band as free charge carriers. Many of these free charge carriers (electron-hole pairs) disappear again after a short time through recombination. Some charge carriers drift - moved by the electric field - to the contacts in the similarly doped zones (see above); i.e. the electrons are separated from the holes, the electrons drift upwards, the holes downwards. A voltage and a usable current are created as long as further photons continuously generate free charge carriers.

(7) The "electron" current flows through the "outer circuit" to the lower contact surface of the cell and recombines there with the holes left behind.
Own work
Michael32710