The generation of current in a solar cell, known as the "light-generated current", involves two key processes. The first process is the absorption of incident photons to create electron-hole pairs. Electron-hole pairs will be generated in the solar cell provided that the incident photon has an energy greater than that of the band gap. However, electrons (in the p-type material), and holes (in the n-type material) are meta-stable and will only exist, on average, for a length of time equal to the minority carrier lifetime before they recombine. If the carrier recombines, then the light-generated electron-hole pair is lost and no current or power can be generated.
A second process, the collection of these carriers by the p-n junction, prevents this recombination by using a p-n junction to spatially separate the electron and the hole. The carriers are separated by the action of the electric field existing at the p-n junction. If the light-generated minority carrier reaches the p-n junction, it is swept across the junction by the electric field at the junction, where it is now a majority carrier. If the emitter and base of the solar cell are connected together (i.e., if the solar cell is short-circuited), the the light-generated carriers flow through the external circuit. The ideal flow at short circuit is shown in the animation below.