http://revach.net/article.php?id=2890

Section: Halacha   Category: Food
Somewhere Over The Rainbow...
When one sees a rainbow a bracha should be made.  However, one should be careful not to stare at a rainbow for too long (Shulchan Aruch 229:1). The Zohar writes that this is because one looking at a rainbow is as if he is looking at the Shechina (Parshas B'shalach 66b). 

There is a debate amongst the poskim as to whether or not these halachos apply to rainbows caused by natural events (as opposed to those that appear in the sky out of nowhere) such as after a rainstorm or in water.  The Ben Ish Chai writes (Parshas Eikev: 17) that it would seem that one should not make a bracha on a rainbow that appears naturally; however, being that the general accepted minhag is to make a bracha on any rainbow, one should make a bracha on a rainbow that appears naturally.   

It is written in the Mishna Brura (229:1), that when one sees a rainbow he should not inform a friend about it but rather make a bracha and keep it to himself.