The emission of electrons from the surface of a metal when light at or above a certain threshold frequency shines on it is called the "Photoelectric Effect". It really doesn't have much to do with static electricity.
The photoelectric effect is the emission of electrons from a metal when it is illuminated with light of sufficient energy. Discovered by Heinrich Hertz and explained by Albert Einstein, it is key to understanding the quantum behavior of light. This effect has practical applications, such as in solar panels where sunlight generates electric current.
;