The point is that the radiation from a heated body depends to some extent on the body being heated. To see this most easily, let’s back up momentarily and consider how different materials absorb radiation. Some, like glass, seem to absorb light hardly at all—the light goes right through. For a shiny metallic surface, the light isn’t absorbed either, it gets reflected. For a black material like soot, light and heat are almost completely absorbed, and the material gets warm. How can we understand these different behaviors in terms of light as an electromagnetic wave interacting with charges in the material, causing these charges to oscillate and absorb energy from the radiation? In the case of glass, evidently this does not happen, at least not much. Why not? A full understanding of why needs quantum mechanics, but the general idea is as follows: there are charges—electrons—in glass that are able to oscillate in response to an applied external oscillating electric field, but these charges are tightly bound to atoms, and can only oscillate at certain frequencies. It happens that for ordinary glass none of these frequencies corresponds to visible light, so there is no resonance with a light wave, and hence little energy absorbed. That’s why glass is perfect for windows! But glass is opaque at some frequencies outside the visible range (in general, both in the infrared and the ultraviolet). These are the frequencies at which the electrical charge distributions in the atoms or bonds can naturally oscillate.
Now let’s consider a substance that absorbs light: no transmission and no reflection. We come very close to perfect absorption with soot. Like a metal, it will conduct an electric current, but nowhere near as efficiently. There are unattached electrons, which can move through the whole solid, but they constantly bump into things—they have a short mean free path. When they bump, they cause vibration, like balls hitting bumpers in a pinball machine, so they give up kinetic energy into heat. Although the electrons in soot have a short mean free path compared to those in a good metal, they move very freely compared with electrons bound to atoms (as in glass), so they can accelerate and pick up energy from the electric field in the light wave. They are therefore very effective intermediaries in transferring energy from the light wave into heat.