Shulchan Arukh, Orach Chayyim 229:1 says:
הרואה הקשת אומר בא"י אמ"ה זוכר הברית נאמן בבריתו וקיים במאמרו. ואסור להסתכל בו ביותר:
One who sees the rainbow says, "Blessed are you, God our Lord, king of the world, who remembers the covenant, who is faithful to his covenant, and who fulfills his word." And it is forbidden to look upon it further.
This article describes different types of rainbows. I am assuming that the bracha applies only to rainbows that are in the sky and not ones caused by, e.g. Niagra Falls' mist, refraction of sunlight on soap bubbles, etc. (If I'm incorrect, please state why.)
However, not all rainbows seen in the sky are caused by falling rain, where one sees an "arch" (with a big pot of gold at the end ;-) Rainbows are often caused by refraction from cirrus clouds, which are mainly ice crystals. They are also common at night surrounding the halo around the moon.
Would seeing such rainbows require saying the bracha?