Imagine an iron rod—it has a temperature, so it’s already producing electromagnetic radiation in the infrared portion of the spectrum. As it gets hotter, it produces higher and higher levels of electromagnetic radiation. Eventually, the rod is so hot that it produces electromagnetic radiation in the visible portion of the spectrum—the rod is so hot that it produces visible light. This is why an iron rod will glow red under extreme heat. If you get it even hotter, it will produce electromagnetic radiation in all visible wavelengths, producing white light.
The Sun is extremely hot and produces wavelengths in all portions of the electromagnetic spectrum, from radio to gamma. We see all the visible wavelengths, which makes white light. Sunlight only looks yellow because it is filtered through our atmosphere.
Another way to excite atoms, causing them to produce electromagnetic radiation, is to bombard them with electrons. This is how we produce X-rays. X-rays are very high-energy—higher energy than visible light—but shooting X-rays at a person won’t feel hot the way getting near an iron rod would, because nothing is being heated in order to produce the radiation. Furthermore, electromagnetic radiation itself is neither hot nor cold. Photons are just energy of a certain frequency and amplitude; they can excite matter around them which can result in an increase in temperature, but they themselves have no temperature.
Background Information for Activity #2 - Spectroscopy: Electromagnetic Radiation | Electromagnetic Frequency | Light | Generating Electromagnetic Radiation | Sources of Electromagnetic Radiation | Reflection and Absorption | Atomic Spectroscopy | Molecular Spectrscopy