why are electrons generated during photoelectric effect?
Photoelectric effect is defined as the process of emission of electrons from the surface of metal when energetic photons are incident on it. Here, only electrons are ejected because they are held quite loosely inside an atom and can be dislodged easily by the action of collision with an energetic photon.