Several different factors affect the appearance of a sunset on any given night. The most common factors include clouds, fog, and smog in the sky. Other rare but exciting factors are ash from a volcanic eruption and green flashes of light.
Clouds, Fog and Smog
The height of the clouds has a significant influence on how far the reflection of light will reach. Clouds that sit higher in the sky reflect light for farther distances than lower clouds because they can be viewed from a much larger area than lower clouds. This also explains why you are able to see a sunset better after it has dipped below the horizon. As long as you can still see the clouds, and the sun is still reflecting light off the clouds, you will be able to see some traces of the sunset.
The same that is said about clouds can also be said about fog. Fog is the same as a cloud, but it is at a lower elevation. This is due to a low dew point that is equal to the outside temperature. Since fog is the same thing as a cloud, they create the same effects on sunsets. The main difference is that fog will not be able to reflect light as far as clouds can because it is lower to the ground.
Smog, on the other hand, can be compared to a cloud that is infected with dirt. Thus smog will also reflect light but, because it has so many pollutants in it that are different colors, it will also change the color of the sunset. This is one reason why Los Angeles has such nice sunsets in the evening.
Volcanic Ash
Volcanic eruptions, like smog, are full of pollutants. While these pollutants may be naturally made by the Earth, they still contain tons of dust and, more importantly, sulfur dioxide. These pollutants can give off a variety of colors such as purple and pink in addition to the oranges, reds and yellows that you are accustomed to seeing.
Green Flashes
While green flashes are not rare, they only last for a few seconds during each sunset and sunrise. The reason for green flashes is extremely complex and any explanation that is done here would do it no justice. Instead I will leave you with a link to a website that can give you a better understanding of what produces these green flashes.