A photodetector is a device used to convert light energy into electrical signals. A photodiode is a type of photodetector that uses a p-n junction to generate a current proportional to the amount of light absorbed. Photodiodes are commonly used in applications such as optical communication, sensing, and imaging.