According to an old story there is a pot of gold at the end of a rainbow. Nobody has ever found such a treasure because a rainbow is really a circle and therefore has no end. The bottom half, hidden from the observer, lies below the horizon. More important is the fact that a rainbow is really only colored light created in the sky when the rays of the sun strike falling raindrops. Rainbows are curved because the raindrops that reflect the light are themselves curved.
A rainbow occurs after a storm when the sun begins to shine while the air is still filled with raindrops. It is seen best when the sun is behind the observer and the falling mass of raindrops is to his front. This colorful spectacle is seen more often in the morning or in the evening. At noon the sun is so high that its rays cannot get underneath the edge if a rain cloud to strike the sheet of water. This is also the reason why rainbows occur more often in summer than in winter. In summer, showers are usually local so that while it is raining in one area, the sky is clear enough nearby for the sun's rays to emerge. In winter, rainfall is more widespread and the sun is entirely hidden from the observer.
The arcs of colors in a rainbow are caused by refraction.
Each raindrop refracts (bends and separates) the sunlight into bands of distinct
colored lights just as a prism does. The far surface of each drop reflects the
bands of light back toward the observer. As the bands leave the raindrop they
are again refracted.
In primary rainbows the colors are arranged in the order of the spectrum--outside,
or top, red; then orange, yellow, green, blue, and violet. Sometimes the edge
of the raindrop toward the viewer reflects the light back through the farther
edge. This forms a faint secondary bow seen against distant clouds. On these
secondary bows the colors are reversed with red on in the inner edge. In many
rainbows one or more the colors drop out, most often, blue. Red is almost always
present. Some bows have blank white spaces or sometimes dark spaces between
two layers of color.
The rare and beautiful lunar (moon) rainbow is formed in the same way as a solar (sun) rainbow. So are the little bows seen in the spray of waterfalls and lawn sprinklers. Halos around the sun or moon ("white rainbows") are caused by light shinning through tiny ice crystals. Sundogs, colored patches on either side of the sun, are formed by flat hexagonal (six-sided) crystals falling through quite air.
Many years ago men were puzzled by the rainbow and invented fables to explain it. The ancient Greeks imagined it was a sign placed in the heavens by the gods to foretell war or heavy rain. The Norsemen believed the gods used rainbow as a bridge between earth and their home in the sky. The ancient Hebrews thought the rainbow was a symbol of the Lord's promise never to destroy the earth by flood again.
article: Why is the sky blue?