In 1887, Heinrich Hertz observed that when light with sufficient frequency hits a metallic surface, the surface emits cathode rays. Ten years later, J. J. Thomson showed that the many reports of cathode rays were actually "corpuscles" and they quickly came to be called electrons.  In 1902, Philipp Lenard discovered that the maximum possible energy of an ejected electron is unrelated to its intensity. This observation is at odds with classical electromagnetism, which predicts that the electron's energy should be proportional to the intensity of the incident radiation.
In 1905, Albert Einstein suggested that even though continuous models of light worked extremely well for time-averaged optical phenomena, for instantaneous transitions the energy in light may occur a finite number of energy quanta. 
From the introduction section of his March 1905 quantum paper "On a heuristic viewpoint concerning the emission and transformation of light", Einstein states:
This statement has been called the most revolutionary sentence written by a physicist of the twentieth century. 
The energy of a single quantum of light of frequency  is given by the frequency multiplied by Planck's constant  (an extremely tiny positive number):
Einstein assumed a light quanta transfers all of its energy to a single electron imparting at most an energy  to the electron. Therefore, only the light frequency determines the maximum energy that can be imparted to the electron; the intensity of the photoemission is proportional to the light beam intensity.
Einstein argued that it takes a certain amount of energy, called the work function and denoted by , to remove an electron from the metal. This amount of energy is different for each metal. If the energy of the light quanta is less than the work function, then it does not carry sufficient energy to remove the electron from the metal. The threshold frequency, , is the frequency of a light quanta whose energy is equal to the work function:
If  is greater than , the energy  is enough to remove an electron. The ejected electron has a kinetic energy, , which is, at most, equal to the light energy minus the energy needed to dislodge the electron from the metal:
Einsteins description of light as being composed of energy quanta extended Plancks notion of quantized energy, which is that a single quanta of a given frequency, , delivers an invariant amount of energy, .
In nature, single quanta are rarely encountered. The Sun and emission sources available in the 19th century emit vast amount of energy every second. Planck's constant, , is so tiny that the amount of energy in each quanta,  is very very small.  Light we see includes many trillions of such quanta.