From a purely technical sense rainbows are simply a diffraction or separation of light into its components by wavelengths. This distillation of light lets us see the components of the light provided to us by our personal star the sun. We can even make our own by spraying a mist of water into the air, blowing a soap bubble, or a drop of oil on still water. Technical stuff but still pretty. We can even remember the colors by the name of a fellow called ROY G BIV.
That is ---
In nature we see the rainbow most often once the storm has passed. This has been the source of many symbolic links in our language and culture. The rainbow can symbolize hope, joy, the beginning of something better, celebration of something good, the path to treasure and more. There is so much imagery there that I can only touch the surface of it all.
When we seek to find the end of nature's rainbow we never get there or find the pot of gold. It is best to appreciate the beauty from the proper distance. However, you won't see them at all if you're not in the right place or don't look for them.
Life's symbolic rainbows are much the same. You have to be in the right place, you have to look, and sometimes you can't see them if you get too close.