Many PN junction based components such as diodes and transistors are photosensitive; I recall after reading this as a kid on an old electronics magazine, I took a 2N3055, a pretty common power bipolar transistor back then, uncapped it to expose the die then connected it to my analog tester and saw it generating current when exposed to a lamp.
The effect is common also in devices one could never suspect to be sensitive to light such as LEDs. They can produce light but also detect it. A few years ago someone published a project online of a MCU based keyboard (actually a button board) made of PWM driven LEDs that can both produce light and during their off cycle detect it, so that one turns them on and off just by touching them with a finger screening them from surrounding light. I attempted to search for that project without luck.