God made the rainbow to symbolize that He would never again bring a mighty flood that destroyed creation again like He did during Noah’s time.
12 Then God said, “I am giving you a sign of my covenant with you and with all living creatures, for all generations to come. 13 I have placed my rainbow in the clouds. It is the sign of my covenant with you and with all the earth. 14 When I send clouds over the earth, the rainbow will appear in the clouds, 15 and I will remember my covenant with you and with all living creatures. Never again will the floodwaters destroy all life. 16 When I see the rainbow in the clouds, I will remember the eternal covenant between God and every living creature on earth.” 17 Then God said to Noah, “Yes, this rainbow is the sign of the covenant I am confirming with all the creatures on earth.”