The photoelectric effect is the emission of electrons or other free carriers when light hits a material. Electrons emitted in this manner can be called photoelectrons. This phenomenon is commonly studied in electronic physics, as well as in fields of chemistry, such as quantum chemistry and electrochemistry.
To make sense of the fact that light can eject electrons even if its intensity is low, Einstein proposed that a beam of light is not a wave propagating through space, but rather a collection of discrete wave packets (photons). Wiki
Einstein clearly stated that he knows not what are light quanta.
In reality, light is alternating current coexisting with atoms/medium. If the frequency is high enough, it can vibrate electrons moving in solar cells and produce electric current. This is the true mechanism of so lied photoelectric effect theory.