On a recent autumn night here in Washington, D.C., the sun seemed to personify a Dylan Thomas poem: Do not go gentle into that good night ... Rage, rage against the dying of the light. The scarlet skies inspired many viewers to grab their cameras, and prompted a question: Why are some sunsets so spectacular, and others a mere muddle?

We asked Stephen Corfidi, a National Oceanic and Atmospheric Administration (NOAA) meteorologist who's written about the science of colorful sunsets, to help us see the light.

In simple terms, what makes a good sunset happen?

I guess it depends on how you define "good," but I'm going to assume you mean a strikingly colorful one, where the colors are spectrally pure—say, vivid orange or red—as opposed to a more muted palette.

Keep in mind that what we see with our human eyes is just a tiny part of the electromagnetic radiation that's given off by the sun. That radiation contains a wide spectrum of wavelengths, but your eyes are only sensitive to certain parts of it: the so-called visible wavelengths. Different colors are associated with different wavelengths.

And depending on what happened to the light before it got to you, some of those visible wavelengths don't even reach your eye. Portions of it are absorbed and filtered out in the atmosphere.

So really, there's a good sunset every night; we just can't always see it from the ground. You may have noticed this if you've ever taken off in an airplane at sunset. It might not look like anything special from the ground, just a whitish-pink sky, because you're still within the atmosphere's "boundary layer." That's where all the large particles are trapped, things like dust and pollution. But as the plane gets above the boundary layer, into cleaner air, suddenly the sunset looks very vivid. It's all a matter of perspective.

Okay, so let's talk about the typical Earthling's perspective. Why do we see more orange and red colors in the sky during sunrise and sunset than we do at other times of day?

When a beam of sunlight strikes a molecule in the atmosphere, what's called "scattering" occurs, sending some of the light's wavelengths off in different directions. This happens millions of times before that beam gets to your eyeball at sunset.

The two main molecules in air, oxygen and nitrogen, are very small compared to the wavelengths of the incoming sunlight—about a thousand times smaller. That means that they preferentially scatter the shortest wavelengths, which are the blues and purples. Basically, that's why the daytime sky is blue. The daytime sky would actually look purple to humans were it not for the fact that the sensitivity of our eyes peaks in the middle [green] part of the spectrum—that is, closer to blue than to purple.

But at sunset, the light takes a much longer path through the atmosphere to your eye than it did at noon, when the sun was right overhead. And that is enough to make a big difference as far as our human eyes are concerned. It means that much of the blue has scattered out long before the light reaches us. The blues could be somewhere over the West Coast, leaving a disproportionate amount of oranges and reds as that beam of light hits the East Coast.

So the same ray of sunlight is hitting people in both the Rockies and the Appalachians? Basically, the East gets the West's leftovers at sunset?

Yes, I think a lot of people don't realize that. Everything is connected. And as humans, we like to think color is concrete: "Oh, that's a blue sky," or "That's a brown table." But the colors you see depend on the light's path before it got to you, how the object you are viewing reflects that light, and what your eyes are sensitive to. Absolutes don't really exist in color perception. It's rather disquieting when really you start thinking about it!

Do dust and air pollution make sunsets more dramatic?

No, you often hear that, but—assuming you mean typical pollution in the lower atmosphere—it's a myth. It's actually the opposite: Large particles in the lower atmosphere tend to mute and muddy the colors because they absorb more light and scatter all the wavelengths more or less equally, so you don't get that dramatic filtering effect. In areas with a lot of haze, you don't typically see the types of sunsets that are likely to appear on a wall calendar—or in, say, National Geographic.

Do the seasons affect sunsets?

You see bright ones in the fall and winter particularly, especially in the East, because the air along the path of the ray of sunlight tends to be dryer and cleaner.

I grew up in Baltimore, and this is part of why I got interested in weather. I would wonder: Why is the sunset so pretty tonight? And there weren't answers to questions like this in standard weather books, because it's more about physics than forecasting.

Speaking of forecasting, what about the saying: "Red sky at night, sailor's delight; red sky in morning, sailors take warning." Any scientific truth to that?

Absolutely. Those spectrally pure colors are telling you there's a sizable swath of clear air off to your west that's likely to be over you the next day.

So conversely, could local weather forecasters predict a pretty sunset?

Yeah, you can forecast them to a certain degree. I guess it's a question of who cares—maybe filmmakers or photographers would find that information useful, but most people just want to know if it's going to rain or not.

Why are sunsets sometimes more dramatic after a major storm?

There's often a slanting band of clouds on the back side of the departing weather system, and that can act as a sort of projection screen for the low-sun colors, better than a horizontal band would. The slant means it captures more of the orange and red light, and if the cloud is thin enough, it will reflect those colors down to you. Also, storms wash a lot of the big particles out of the air.

Is it true that by the time we see a sunset, the sun is actually already gone?

Yes, true sunset occurs a minute or so before you see the sun disappear. What you see is a kind of mirage; the light is getting bent around the horizon by the effect of refraction.

Sounds like there's a lot of science to sunsets, but it's also a very subjective experience.

Yes. Our eyes are sensitive to a very tiny part of the spectrum of the sun's wavelengths, and that's responsible for the way we see our environment. Other creatures seem able to see the ultraviolet area of the spectrum. We can only see a tiny part of what's going on.

So a butterfly or a reindeer, which can perceive ultraviolet light, might be seeing a different, perhaps more colorful sunset than we do?

Absolutely. The more you look at things, the more you realize how unique your own experience is as a human on this planet, at this particular place and time.

This interview has been edited and condensed.