Light contains photons whose energy is dependent on their frequency. The energy in the photons is given by planck's constant multiplied by the frequency.
This energy is small. When light rays fall on a metal, the some or most of the energy of the photons is absorbed by the electrons in the atoms near the surface of the metal object. Then the electrons get excited and enter the next energy state. So if the ionization energy is small, then the electrons in the outer most orbit escape from the atom. These electrons are called photoelectrons. This effect of release of electrons from the metal is called photoelectric effect.
When the ionization energy is small, the energy gap between the excitation states of the electrons is also small.
When the excited electrons, or the escaped electrons enter their original energy states or orbitals, some energy is released. This is viewed as the radiation due to photoelectric effect.