The photoelectric effect occurs when light of sufficient frequency strikes a metallic surface, causing the emission of electrons. Yellow light has a higher frequency than green light, which is why it can cause the ejection of electrons even at the same intensity.