Because the atoms electrons absorb the atoms kinetic energy and jump to a higher shell, then when the electrons fall down they release that energy in the form of a photon.
PeacefulTRex1324: mmm but why
Because tungsten is what is used in the filaments of light bulbs, and when it gets hot it emits light.