Warning for purists: this is going to be very hand-wavy. Planck's work was esoteric, cutting-edge Physics at the time (c 1900) and is still highly technical second or third year undergraduate Physics, requiring a knowledge of statistical mechanics – glossed over in what follows.
Black body radiation is the radiation inside a cavity with walls at a fixed temperature. The radiation is in the form of 'standing' electromagnetic waves. Many frequencies of standing wave will co-exist. There will be more possible modes of standing wave with frequencies between (say) 80 THz and 90 THz than between (say) 10 THz and 20 THz and the number of modes per 10 THz interval goes up continuously with frequency. So if the energy of the radiation is distributed evenly among different modes of standing wave, one would expect the high frequency modes (ultraviolet and beyond) to hog the lot – simply because there are more and more modes (without bound!). This was later called 'the ultraviolet catastrophe'.
The word 'catastrophe' was used because this prediction seemed like a catastrophe for theoretical physics. The high frequency modes don't hog all the energy – far from it. Lummer and Pringsheim had conducted careful experiments which showed that energy density peaked at some intermediate frequency. Planck built on the work of Wien, Boltzmann and others and succeeded in finding an equation that fitted these experimental results.
Planck then discovered that he could derive this equation from pure theory, but only by making what he considered to be an outrageous hypothesis: that for a mode of frequency f, the energy in the cavity can only exist in 'lumps' or quanta of size E = hf. How does this avoid the ultraviolet catastrophe? Even a single quantum for a very high frequency mode would be huge. The chances of great chunks of the available energy going to more than a few (high frequency) modes were remote; these greedy modes were priced out of the market!
This attempt at explaining Planck's brilliant idea has made several oversimplifications. For one, Planck stressed quantisation of the energies emitted and absorbed by oscillators in the cavity walls, rather than quantisation of the waves themselves. Above all, I've totally omitted the mathematical treatment – which is what makes Planck's work so convincing for physicists.