Every body radiates energy over a range of wavelengths.
How much energy is emitted at each wavelength (shape of the curves) is predicted by the classical theory. Well established theories of Thermodynamics, Statistical mechanics and Electromagnetism
form the basis of such predictions.
In 1900 Planck suggested that physics should abandon the assumption that energy is continuous and wavelike. Instead, if energy can only be absorbed and emitted in discrete packets (or quanta now called photons ), theory can be made to fit observations exactly.
Energy of a quantum = h x its frequency
Planck’s suggestion was ad hoc and had no theoretical basis This troubled a lot of people including Planck. Planck believed in the wave nature of light (energy) and insisted that it might be in the way individual matter atoms interact with radiation that gives rise to the quantum aspects in the emission of radiation. It was Einstien who in 1905 first suggested that light (energy) is actually quantised following Planck's equation.
Planck was awarded Nobel Prize for his work in 1918. Planck and Einstein became good friends. Planck supported Einstein during the turbulent period when Jews were being prosecuted in Germany.