Explain the working principle of a photodiode in light detection.
A photodiode works on the principle of the photoelectric effect, where it converts light into an electrical current. When photons are absorbed by the photodiode, they generate electron-hole pairs, leading to a flow of current in the external circuit. Photodiodes are used for light detection and photometry due to their sensitivity to light.