I have placed My rainbow in the cloud, and it shall be for a sign of a covenant between Myself and the earth. (Genesis 9:13)
The Code of Jewish Law (Orach Chaim 229:1) states that one should recite a special blessing on seeing a rainbow (see page 782 of the Chief Rabbi’s siddur). The blessing can only be recited once during the rainfall although Rabbi Yisrael Meir Kagan (d. 1933) implies that the blessing may be recited again on a second rainbow provided the original rainbow has disappeared (Mishnah Berurah 229:2). Rabbi Kagen is also unclear as to whether the blessing may be recited if only a partial rainbow can be seen or whether the entire rainbow must be seen (Biur Halacha 229:1).
Nevertheless, there are some laws which provide a deeper insight into the blessing. Rabbi Avraham HaLevi Gombiner (d. 1683) states that one should not gaze at the rainbow but merely glance at before reciting the blessing (Magen Avraham 229:2). The Gemara (Chagigah 16a) explains that since the verse in Ezekiel (1:28) compares God’s glory to the image of a rainbow, gazing at it is akin to staring at the glory of God and therefore is inappropriate.
A further aspect of this blessing is that one should not publicise the existence of the rainbow to others even though it would give them the opportunity to make the blessing (Mishnah Berurah 229:1). The reason given is that the rainbow still carries a negative connotation as a reminder of the destruction and the need for repentance. The Midrash teaches that although the sign of the rainbow was given for every generation (Genesis 9:12) it excluded the righteous generations who did not need it to remind them to be upright and moral (Genesis Rabbah 35:2).
The symbol is therefore twofold. While the sight of the rainbow is an opportunity for reciting a blessing which declares that God remembers His covenant with Noah to never again destroy the world through a flood, it serves as a reminder that we must continue to aspire towards a more moral and just world.