If we incident a monochromatic light (assume red light) on a glass layer starting from thinner to gradually thicker and thicker layers of glass, partial reflection increases to $ 16\% $ and returns to zero-a cycle that repeats itself again and again. If the the layer of glass is just the right thickness, there is no reflection at all! And it is to be noted that the cycle of zero to $16\%$ partial reflection by surfaces repeats more quickly for blue light than for red light. In fact, that's the only difference between a red photon and a blue photon (or a photon of any other color, including radio waves, X-rays, and so on)-the speed at which the cycle repeats with the thickness.
When we shine red and blue light on a film of oil, patterns of red, blue, and violet appear, separated by borders of black. When sunlight, which contains red, yellow, green, and blue light, shines on a mud puddle with oil on it, the areas that strongly reflect each of those colors overlap and produce all kinds of combinations which our eyes see as different colors. As the oil film spreads out and moves over the surface of the water, changing its thickness in various locations, the patterns of color constantly change. (If, on the other hand, you were to look at the same mud puddle at night with one of those sodium streetlights shining on it, you would see only yellowish bands separated by black-because those particular streetlights emit light of only one color.)$_1$
If we incident sun light (polychromatic) on a prism, we are passing light over a large area with varied thickness, which can account for the consequence of rain-bow color formation. Here in the case of the earth's atospheric layers we can assume them a glass slabs of uniform thickness which can't form colors as oil puddle does.$_2$
Credits: $_1$ Richard Feynman-QED, The strange Theory of Light and Matter. $_2$ Reference from reliable sources required.