It's perhaps easier to understand light coming from an atom, as in our previous example: the energy of the photon comes from the energy released when the electron moves to a lower energy state. But what about thermal radiation? Everything that's warmer than absolute zero (and that's everything in the universe, as far as we know!), emits light. EVERYTHING. It's called blackbody or thermal radiation. But Why?? Heat energy is manifested in thermal motions of the atoms. These restless, bouncing-about atoms disturb the electrons in them. When ever you perturb, vibrate, and/or move an electron, it creates electromagnetic radiation (because you are accelerating a charged particle). The HOTTER the object, the FASTER the atoms move, the stronger you perturb the electrons, the greater the electromagnetic radiation (light) that comes from that object.
The result is that the amount and kind of thermal radiation produced is dependent on temperature of the object
Everything in the Universe emits BLACK BODY RADIATION, because everything has some TEMPERATURE. This kind of light is best described by two important laws: