After Noach and his family came out the ark, Hashem showed Noach a rainbow. The Pasuk states (Bereishit 9:13) "Et Kashti Natati BeAnan, VeHayeta LeOt Berit Beini UVein HaAretz," "I (Hashem) have set a rainbow in the cloud, and it shall be a sign of the covenant between Me and the earth"
Hashem made a promise that this rainbow shall be a sign for all future generations. The Shulchan Aruch (Orach Chaim 229:1) states that every time we see a rainbow, we should take it as a sign from Hashem that He will never again bring a flood to completely destroy the world. Therefore, we recite the Berachah, "Zocher HaBrit VeNe’aman BeVrito VeKayam BeMaamaro," "Who remembers His covenant, is trustworthy in His covenant, and fulfills His word." We acknowledge that Hashem remembers the covenant he made to Noach.
When does this rainbow come, and when was it created? Just like this rainbow came after the rainstorm of the flood, today the rainbow comes after a rainstorm. The Ibn Ezra believes that Hashem created the rainbow when it first appeared after the flood. On the other hand, many other Meforshim say the rainbow was created when Hashem created the rest of the world.
So next time you see a rainbow, remember what it means.