Why black body radiation is all over the frequency range I was studying black body radiation and how quantization of energy solves the problem of ultraviolet catastrophe. But I have a very fundamental doubt. A black body can be assumed as a cavity with a small hole with radiation leaking out of it. As the temperature of the black body is increased we can assume the the charge particles, electrons, on the metal surface will behave as harmonic oscillators and the energy of the harmonic oscillation will be equal to the energy density of the radiation inside the cavity at thermal equilibrium.
My doubt is that at thermal equilibrium, the cavity(assuming it to be uniform) will have a uniform temperature. Since the oscillations of the charged particles is due to the thermal agitation, how can the charge particles radiate all over the frequency range? The temperature is uniform over the cavity, wont they all be experiencing same thermal agitation and oscillate at same frequency
 A: In thermal equilibrium, at a fixed temperature, there still exist processes that are able to convert energy carried by a frequency $f$ photon (or another particle) to photons (or other particles) at different frequencies. All these processes are in equilibrium.
By definition, a black body is an object that absorbs the incident light of all frequencies. It means that it is able to transform incoming frequency $f$ photons to some internal vibrations of the black body for all values of $f$. This is really approximately the case for objects that are called "black" in the colloquial sense.
For this reason, there is no "qualitatively preferred" frequency $f$ for a given absolute temperature $T$. All possible frequencies of the electromagnetic fields – and internal oscillators of the black body with all characteristic frequencies – are excited to some extent. They have to. If some of them were not excited, they would get excited because of the interactions with the other, excited degrees of freedom, so the state wouldn't be equilibrium.
At most, when one derives the black body curves, he will see that there is a frequency for which the energy density is maximized, and it is of order $\omega \sim kT/\hbar$. But the curve of the energy density as a function of the frequency is unavoidably continuous.
Roughly speaking, the energy – more precisely $kT/2$ – is the "energy per degree of freedom". At a fixed temperature in equilibrium, everything that may move or oscillate, every single degree of freedom, carries pretty much the same energy, regardless of its other properties such as its frequency.
A: A simpler point of view:

My doubt is that at thermal equilibrium, the cavity(assuming it to be uniform) will have a uniform temperature. Since the oscillations of the charged particles is due to the thermal agitation, how can the charge particles radiate all over the frequency range? The temperature is uniform over the cavity, wont they all be experiencing same thermal agitation and oscillate at same frequency

I think you are confusing temperature with energy. The frequencies of the photons are h*nu, directly connected with the energy, but temperature is only connected with the average kinetic energy in any ensemble that can have a temperature. It is an intensive variable   , bulk, and does not depend on volume or density . An average comes from a distribution, and the distribution 


a maxwell boltzman distribution for a given molecule ( from a chemistry blog)

has all energies on the x axis, from 0 to the limit of the problem at hand. 
That there exists a thermal equilibrium does not describe the kinetic energy of individual atoms/molecules . For a given temperature,  there is one distribution ( as pointed out by Lubos in the comments and his answer), but the kinetic energy varies,   and therefore agitation and oscillation are variables, allowing the range of photon energies seen in black body radiation.  It is only the averages that are constrained by the equilibrium temperature.
