L14G2 is an NPN phototransistor. It acts as a photodetector in the sense that it can convert the incident light into electric response. They are commonly used as sensors usually paired with a light source like LED.
These are the bipolar transistors having a transparent case. This transparent case exposes the base collector region of transistor to external light. When light incidents on this junction, electrons are generated by the photons. These electrons are injected in the base of phototransistor. The current gain of the transistor amplifies the resulting photocurrent at the base collector junction. Thus a phototransistor conducts in the presence of light and remains in off mode in absence of light. The maximum dark current is 100nA; while in light its current is 500µA.