In 1859, scientist Robert Kirchhoff introduced an interesting problem into the world of physics: the question of blackbody radiation. A "blackbody" is basically a black box that absorbs all the radiation that is directed toward it. The amount of energy that it emits is independent of the size or shape of the box; it depends only on temperature.
For decades, physicists worked to figure out the relationship between the temperature of the blackbody and the distribution of the emitted energy along the electromagnetic spectrum. This was of particular interest to theorists because finding the relationship could yield valuable physical constants that could then be applied to other physics concerns. However, there was a more concrete and technical reason to search for a formula relating energy to temperature. Such an equation could be used as a standard for rating the strength of electric lamps.
For this reason, the imperial bureau of standards–the Physikalisch- Technische Reichsanstalt–took a special interest in finding the formula. And, in 1896, a young German physicist working there, Wilhelm Wien, seemed to have stumbled onto an equation that worked. With the knowledge of the spectral distribution of the energy at one temperature, Wien's equation would produce the distribution for any other temperature. It was an experimentally accurate theory, but Wien had no explanation for why his equation worked; he knew only that it did.
Meanwhile, Planck was hired to take Kirchhoff's old job at the University of Berlin. Planck spent much of the 1890s studying problems of chemical thermodynamics, specifically entropy. His work in this field led him to the puzzle of blackbody radiation, and he set himself the goal of finding a workable theory that would yield Wien's equation.
But just as Planck thought he'd found the answer, a series of experiments proved that Wien's equation was actually incorrect. Rather than assuming his theory was correct and hoping the empirical data would eventually prove him right, Planck chose to trust the experimental results: Wien's theory was wrong, which mean Planck's was, too. So, in 1900, Planck was forced to start all over again.
At this point, Planck took a revolutionary step, although he didn't realize it at the time. Unable to get the numbers to work any other way, he made a bold assumption: Planck posited that energy was emitted by the black box in tiny, finite packets. This was an unprecedented move, as it had always been assumed that energy came in an unbroken continuous wave, not in a series of discrete energy packets. But the assumption led Planck to an equation that worked, the equation that would make him famous: E = hv.