(N/A) photodiode is a special-purpose $p-n$ junction diode.
It is fabricated with a transparent window to allow light to fall on the diode.
When the photodiode is illuminated with light (photons) having energy $(h\nu)$ greater than the energy gap $(E_g)$ of the semiconductor,electron-hole $(e-h)$ pairs are generated due to the absorption of photons.
The illuminated photodiode in reverse bias is shown in the figure.
The diode is fabricated such that the generation of $(e-h)$ pairs takes place in or near the depletion region of the diode.
Due to the electric field of the junction,electrons and holes are separated before they can recombine.
The direction of the electric field is such that electrons reach the $n$-side and holes reach the $p$-side.
Electrons are collected on the $n$-side and holes are collected on the $p$-side,giving rise to an electromotive force $(emf)$. When an external load is connected,current flows through the circuit.
The magnitude of the photocurrent depends on the intensity of the incident light; the photocurrent is proportional to the incident light intensity.
When a reverse bias is applied,the current changes significantly with changes in light intensity.