God blessed Noah and his sons, he also tells them that anything that moves around would be food for them. He also wants a count of every animal and human. God tells Noah that he has made a deal with him. Part of that deal was that God would never flood the Earth ever again. As a sign of his promise he uses a rainbow. The rainbow is to remember God not to flood the earth with water.
"Any living creature creature that moves about shall be yours to eat; creature that moves about shall be yours to eat; I give them all to you as I did the green plants"(Gn 9:3).
"See, I am now establishing my covenant with you and your descendants after you"(Gn 9:9).
"I set my bow in the clouds to serve as a sign of the covenant between me and the earth"(Gn 9:13).