Suppose you have an object which is a perfect absorber/emitter of electromagnetic radiation, a.k.a. a "black body". Suppose we try to compute the electromagnetic power radiated by this object using statistical mechanics and classical electromagnetic theory. We would find that the object emits electromagnetic radiation at all wave lengths, and the wave length dependence of the emitted power would go like
$$P_{\text{classical}} (\lambda)\,d\lambda \propto \lambda^n$$
where $\lambda$ is wave length and $n<0$. The problem here is that integrating at $\lambda \rightarrow 0$ diverges and you get infinite power, which is obviously wrong.
In one of your comments you said:
My question is why should a heated metal, according to the electromagnetic wave theory, emit only a single frequency of light regardless of how hot it is
Note that this is neither true nor the real issue. The electromagnetic wave theory in classical physics predicts power at all wave lengths (all frequencies). The problem is that there's too much power at low wave lengths (high frequencies). This is not due to the wave nature.
If you redo the calculation assuming that you still have waves, but that each mode of the electromagnetic field can only have discrete quantities of energy in it, you get a $P(\lambda)$ which contains finite power, and more importantly, is reproduced in experiment! This "quantum" theory still has waves, but the energy in each wave comes in discrete chunks.
To recap, the thing that makes the classical electromagnetic theory fail is that it assumes that each mode of the electromagnetic field can have any level of energy in it. This leads to an infinite radiation power for a black body. In quantum theory, each mode's energy comes in discrete (not continuous) values, and this leads to a correct prediction for the wavelength-dependent radiated power.
The actual form of the radiated power predicted in quantum theory is the Planck law.