There are special diodes, that are designed to measure light intensity, also regular LED can be used for this, but I was wondering, if any diode is suitable here? In this post I will share results of those experiments.
Theoretical background of this is well described in Wikipedia: “A photodiode is a PN junction or PIN structure. When a photon of sufficient energy strikes the diode, it excites an electron, thereby creating a free electron (and a positively charged electron hole). This mechanism is also known as the photoelectric effect. [...] Since transistors and ICs are made of semiconductors, and contain P-N junctions, almost every active component is potentially a photodiode.” [source]
Regular diode used as a photo-element – [Link]