The photoelectric effect is a phenomenon in which the incidence of energetic electromagnetic radiation on material causes the emission of bound electrons from the material.
The German physicist named Heinrich Hertz is credited for the discovery of the photoelectric effect. In 1887, he conducted an experiment, where the incidence of electromagnetic radiation caused sparks in a gap in the circuit set up by Hertz.
He observed that the sparks decreased when the apparatus was kept in a dark room or in a glass box. This is because of the absorption of ultraviolet radiation by the glass.
This showed the dependence of electromagnetic radiation on the generation of sparks (electricity).
Hence, Heinrich Hertz discovered the photoelectric effect.