Electromagnetic radiation is a form of energy. The light that we see is a type of electromagnetic radiation. However it is only a very small part of the entire electromagnetic spectrum. Sound, another form of energy, is not part of this spectrum. Electromagnetic radiation is different from sound in that it can travel in space and does not need a medium like air or water to travel through.
Electromagnetic radiation is made when an atom absorbs energy. The absorbed energy causes one or more electrons to change their locale within the atom. When the electron returns to its original position, an electromagnetic wave is produced. Depending on the kind of atom and the amount of energy, this electromagnetic radiation can take the form of heat, light, ultraviolet, or other electromagnetic waves.
There are several ways of causing atoms to absorb energy. One way is to excite the atoms with electrical energy. We do this in neon signs. The electricity we put through the neon tubes will excite or add energy to the neon atoms. These electrons in these atoms are then in a high energy state. The electrons don't like to be in the high energy state and will fall back down into the low energy state giving off radiation which we see as light.
This explains why we see light but doesn't explain why neon signs are a reddish-purple. (Neon signs are other colors, but that is because they are made out of colored glass.) The reason why neon signs are a certain color is because when a gas is excited by electricity, it tends to only emit certain colors. If we take a neon sign and separate out the colors with a prism we would see the following spectrum:
An observant student might now ask -- I see how light can produce colors now, but where does white light come from? The answer is that it comes from all the colors. When you take all the colors and combine them then you will get white. If we place sunlight or light from an incandecent lightbulb though a prism we would see the following spectrum:
Now this spectrum looks different from the neon light because it is continuous. It is an entire band of light and not just several different lines. The reason why this spectrum looks different is because it was not generated by electricity exciting particular gases. It was generated by heat exciting atoms. In both a light bulb and on the Sun, the atoms are heated to a very high temperature. This temperature is hot enough to excite atoms into giving off light. This light given off is in a continuous color spectrum.
What is heat?
How does heat move?
What is an atom?
Does heat travel differently in space than it does on Earth?
What role does the Sun play in space missions like DS1's?
Where does energy come from and go?
Why does electrical current make heat?