In 1905, Einstein’s comparison between dim (or dilute) light, and an ideal (dilute) gas led him to conclude that under certain conditions, light will behave as a particle.
The photoelectric effect is a result of electron-photon pair collisions.
In 1887 Hertz confirmed the wave nature of light and also (inadvertently) its particle (photon) nature as well.
In 1921, Einstein won the Nobel Prize. The citation reads:
“To Albert Einstein for his services to theoretical physics and especially for his discovery of the law of the photoelectric effect.”
To be sure, Einstein is being acknowledge for the “the law of the photoelectric effect”, in other words for his photoelectric equation, but not for the photon concept. This attitude would persist until 1923, when new experimental results would convert pretty much everyone to the existence of photons.
Einstein’s 1905 paper, On a Heuristic Point of View Concerning the Production and Transformation of Light is often (wrongly) referred to as his paper on the photoelectric effect.
In his1905 paper, On a Heuristic Point of View Concerning the Production and Transformation of Light, Einstein showed how his newly introduced light quanta hypothesis could be used to interpret several well-known experimental observations, the most notable of these phenomena being the photoelectric effect.