Atoms give off light when heated because heat energy pushes their electrons into higher energy levels, and when those electrons fall back down, they release that energy as light. This is the fundamental process behind everything from the orange glow of a campfire to the colors of fireworks to the light from stars. The key insight is that electrons can only occupy specific energy levels within an atom, so the light they release comes out in precise packets of energy called photons.
What Happens Inside a Heated Atom
Every atom has electrons arranged in layers around its nucleus, and each layer corresponds to a specific energy level. Under normal conditions, electrons sit in the lowest energy levels available to them. When you add heat, you’re adding kinetic energy. Atoms start vibrating and colliding with each other more violently, and these collisions transfer energy to individual electrons.
When an electron absorbs enough energy from one of these collisions, it jumps to a higher energy level, farther from the nucleus. Physicists call this an “excited” state, and it’s inherently unstable. The electron can only stay there for a tiny fraction of a second before it drops back to its original level. That drop is the moment light gets created: the energy difference between the two levels is released as a photon, a single particle of light.
The color of that photon depends entirely on the size of the energy gap. A large gap produces a high-energy photon, which means shorter wavelengths like blue or violet light. A smaller gap produces a lower-energy photon, which means longer wavelengths like red or orange. This relationship is captured in a simple equation: the energy of the photon equals Planck’s constant multiplied by the frequency of the light. Higher frequency means more energy, which means bluer light.
Why Only Certain Colors, Not All of Them
Before 1900, physicists assumed energy could increase or decrease in a smooth, continuous way, like water flowing from a faucet. Max Planck upended that assumption by proposing that energy comes in discrete chunks, which he called quanta. Einstein later extended this idea, recognizing that light itself is made of individual photons, each carrying a specific amount of energy.
Because electrons in an atom can only exist at fixed energy levels (not in between), the jumps they make are always the same size for a given element. That means the photons they emit always have the same energy, and therefore the same color. This is why heated atoms don’t glow with every color at once. Instead, they produce a specific set of wavelengths, like a fingerprint unique to that element. Scientists call this an emission spectrum.
This is different from what happens with a solid object like a piece of iron heated until it glows. Dense, hot materials emit a continuous spectrum containing all wavelengths, because the atoms are packed so tightly together that their energy levels blur and overlap. Individual atoms or thin gases, on the other hand, produce sharp, distinct lines of color.
Flame Tests: Seeing It in Action
One of the most vivid demonstrations of this process is the flame test, where different metals are placed in a flame and each produces a characteristic color. The heat of the flame excites the metal’s electrons, and the specific energy gaps in each element determine what you see:
- Lithium burns red, emitting light at about 671 nanometers.
- Sodium produces a bright yellow flame at 589 nanometers. This is the same yellow glow you see in older streetlights.
- Potassium gives off a lilac color at around 767 nanometers.
- Copper creates a striking green flame, with its strongest emissions near 511 to 522 nanometers.
- Barium glows blue, with peaks around 455 and 493 nanometers.
- Strontium produces a deep crimson, which is why strontium compounds are used in red fireworks.
Each of these colors corresponds to a specific electron transition within that element’s atoms. Sodium’s yellow, for instance, comes from electrons dropping from the third energy level’s higher sublevel back to its lower sublevel. The energy gap is always the same size, so sodium always glows the same yellow, whether it’s in a chemistry lab, a firework, or a distant star.
Why Hotter Objects Change Color
If you’ve ever watched metal being heated in a forge, you’ve noticed it starts glowing a dull red, shifts to orange, then yellow, and eventually white or even blue-white at extreme temperatures. This happens because of a principle called Wien’s displacement law: as the temperature of an object increases, the peak wavelength of the light it emits shifts toward shorter, higher-energy wavelengths.
At lower temperatures, most of the emitted photons are in the infrared range, invisible to our eyes. As the object gets hotter, the photons become energetic enough to enter the visible spectrum, starting with red (the lowest-energy visible light). Cranking the heat higher pushes the peak emission through orange, yellow, and into blue. The sun, with a surface temperature of about 5,270 degrees Kelvin, peaks at around 550 nanometers, right in the yellow-green part of the spectrum. Hotter stars peak in the blue range, while cooler stars glow red.
This is also why “white hot” is hotter than “red hot.” A white-glowing object is emitting strongly across the entire visible spectrum, which your eyes perceive as white. It takes significantly more thermal energy to reach that point.
How This Works in Neon Signs and LEDs
Heat isn’t the only way to push electrons to higher energy levels. Electricity works too, and that’s the principle behind neon signs. When a strong electric current passes through a glass tube filled with gas, the current energizes the gas atoms, bumping their electrons to excited states. As those electrons drop back down, they emit photons at wavelengths specific to the gas inside the tube. Neon gas produces its famous red-orange glow. Argon emits blue, and krypton produces green.
The underlying physics is identical whether the energy comes from a flame, an electrical current, or a laser. Energy goes in, electrons jump up, electrons fall back down, and photons come out. The color depends on the atom and the specific energy transition. This is why atomic emission is so useful in science and industry: by analyzing the colors of light an unknown substance emits when heated, you can identify exactly which elements are present. Astronomers use this same technique to determine the chemical composition of stars billions of miles away.

