The rainbow is a symbol of the covenant between God, man, and every living creature on earth after the great flood that destroyed the earth due to over 400 years of sinning from all mankind.
Please read the story of Noah and the Flood straight from the Bible (the word of God himself) American Standard Version:
“And it came to pass, when men began to multiply on the face of the ground, and daughters were born unto them, that the sons of God saw the daughters of men that they were fair; and they took them wives of all that they chose. And Jehovah said, My Spirit shall not strive with man for ever, for that he also is flesh: yet shall his days be a hundred and twenty years. The Nephilim were in the earth in those days, and also after that, when the sons of God came in unto the daughters of men, and they bare children to them: the same were the mighty men that were of old, the men of renown. And Jehovah saw that the wickedness of man was great in the earth, and that every imagination of the thoughts of his heart was only evil continually. And it repented Jehovah that he had made man on the earth, and it grieved him at his heart. And Jehovah said, I will destroy man whom I have created from the face of the ground; both man, and beast, and creeping things, and birds of the heavens; for it repenteth me that I have made them. But Noah found favor in the eyes of Jehovah. These are the generations of Noah. Noah was a righteous man, and perfect in his generations: Noah walked with God. And Noah begat three sons, Shem, Ham, and Japheth. And the earth was corrupt before God, and the earth was filled with violence. And God saw the earth, and, behold, it was corrupt; for all flesh had corrupted their way upon the earth. And God said unto Noah, The end of all flesh is come before me; for the earth is filled with violence through them; and, behold, I will destroy them with the earth. Make thee an ark of gopher wood; rooms shalt thou make in the ark, and shalt pitch it within and without with pitch. And this is how thou shalt make it: the length of the ark three hundred cubits, the breadth of it fifty cubits, and the height of it thirty cubits. A light shalt thou make to the ark, and to a cubit shalt thou finish it upward; and the door of the ark shalt thou set in the side thereof; with lower, second, and third stories shalt thou make it. And I, behold, I do bring the flood of waters upon this earth, to destroy all flesh, wherein is the breath of life, from under heaven; everything that is in the earth shall die. But I will establish my covenant with thee; and thou shalt come into the ark, thou, and thy sons, and thy wife, and thy sons’ wives with thee. And of every living thing of all flesh, two of every sort shalt thou bring into the ark, to keep them alive with thee; they shall be male and female. Of the birds after their kind, and of the cattle after their kind, of every creeping thing of the ground after its kind, two of every sort shall come unto thee, to keep them alive. And take thou unto thee of all food that is eaten, and gather it to thee; and it shall be for food for thee, and for them. Thus did Noah; according to all that God commanded him, so did he.”
“And Jehovah said unto Noah, Come thou and all thy house into the ark; for thee have I seen righteous before me in this generation. Of every clean beast thou shalt take to thee seven and seven, the male and his female; and of the beasts that are not clean two, the male and his female: of the birds also of the heavens, seven and seven, male and female, to keep seed alive upon the face of all the earth. For yet seven days, and I will cause it to rain upon the earth forty days and forty nights; and every living thing that I have made will I destroy from off the face of the ground. And Noah did according unto all that Jehovah commanded him. And Noah was six hundred years old when the flood of waters was upon the earth. And Noah went in, and his sons, and his wife, and his sons’ wives with him, into the ark, because of the waters of the flood. Of clean beasts, and of beasts that are not clean, and of birds, and of everything that creepeth upon the ground, there went in two and two unto Noah into the ark, male and female, as God commanded Noah. And it came to pass after the seven days, that the waters of the flood were upon the earth. In the six hundredth year of Noah’s life, in the second month, on the seventeenth day of the month, on the same day were all the fountains of the great deep broken up, and the windows of heaven were opened. And the rain was upon the earth forty days and forty nights. In the selfsame day entered Noah, and Shem, and Ham, and Japheth, the sons of Noah, and Noah’s wife, and the three wives of his sons with them, into the ark; they, and every beast after its kind, and all the cattle after their kind, and every creeping thing that creepeth upon the earth after its kind, and every bird after its kind, every bird of every sort. And they went in unto Noah into the ark, two and two of all flesh wherein is the breath of life. And they that went in, went in male and female of all flesh, as God commanded him: and Jehovah shut him in. And the flood was forty days upon the earth; and the waters increased, and bare up the ark, and it was lifted up above the earth. And the waters prevailed, and increased greatly upon the earth; and the ark went upon the face of the waters. And the waters prevailed exceedingly upon the earth; and all the high mountains that were under the whole heaven were covered. Fifteen cubits upward did the waters prevail; and the mountains were covered. And all flesh died that moved upon the earth, both birds, and cattle, and beasts, and every creeping thing that creepeth upon the earth, and every man: all in whose nostrils was the breath of the spirit of life, of all that was on the dry land, died. And every living thing was destroyed that was upon the face of the ground, both man, and cattle, and creeping things, and birds of the heavens; and they were destroyed from the earth: and Noah only was left, and they that were with him in the ark. And the waters prevailed upon the earth a hundred and fifty days.”
“And God remembered Noah, and all the beasts, and all the cattle that were with him in the ark: and God made a wind to pass over the earth, and the waters assuaged; the fountains also of the deep and the windows of heaven were stopped, and the rain from heaven was restrained; and the waters returned from off the earth continually: and after the end of a hundred and fifty days the waters decreased. And the ark rested in the seventh month, on the seventeenth day of the month, upon the mountains of Ararat. And the waters decreased continually until the tenth month: in the tenth month, on the first day of the month, were the tops of the mountains seen. And it came to pass at the end of forty days, that Noah opened the window of the ark which he had made: and he sent forth a raven, and it went forth to and fro, until the waters were dried up from off the earth. And he sent forth a dove from him, to see if the waters were abated from off the face of the ground; but the dove found no rest for the sole of her foot, and she returned unto him to the ark; for the waters were on the face of the whole earth: and he put forth his hand, and took her, and brought her in unto him into the ark. And he stayed yet other seven days; and again he sent forth the dove out of the ark; and the dove came in to him at eventide; and, lo, in her mouth an olive-leaf plucked off: so Noah knew that the waters were abated from off the earth. And he stayed yet other seven days, and sent forth the dove; and she returned not again unto him any more. And it came to pass in the six hundred and first year, in the first month, the first day of the month, the waters were dried up from off the earth: and Noah removed the covering of the ark, and looked, and, behold, the face of the ground was dried. And in the second month, on the seven and twentieth day of the month, was the earth dry.
Go forth from the ark, thou, and thy wife, and thy sons, and thy sons’ wives with thee. Bring forth with thee every living thing that is with thee of all flesh, both birds, and cattle, and every creeping thing that creepeth upon the earth; that they may breed abundantly in the earth, and be fruitful, and multiply upon the earth. And Noah went forth, and his sons, and his wife, and his sons’ wives with him: every beast, every creeping thing, and every bird, whatsoever moveth upon the earth, after their families, went forth out of the ark. And Noah builded an altar unto Jehovah, and took of every clean beast, and of every clean bird, and offered burnt-offerings on the altar. And Jehovah smelled the sweet savor; and Jehovah said in his heart, I will not again curse the ground any more for man’s sake, for that the imagination of man’s heart is evil from his youth; neither will I again smite any more everything living, as I have done. While the earth remaineth, seedtime and harvest, and cold and heat, and summer and winter, and day and night shall not cease.”
“And God blessed Noah and his sons, and said unto them, Be fruitful, and multiply, and replenish the earth. And the fear of you and the dread of you shall be upon every beast of the earth, and upon every bird of the heavens; with all wherewith the ground teemeth, and all the fishes of the sea, into your hand are they delivered. Every moving thing that liveth shall be food for you; as the green herb have I given you all. But flesh with the life thereof, which is the blood thereof, shall ye not eat. And surely your blood, the blood of your lives, will I require; at the hand of every beast will I require it: and at the hand of man, even at the hand of every man’s brother, will I require the life of man. Whoso sheddeth man’s blood, by man shall his blood be shed: for in the image of God made he man. And you, be ye fruitful, and multiply; bring forth abundantly in the earth, and multiply therein. And God spake unto Noah, and to his sons with him, saying, And I, behold, I establish my covenant with you, and with your seed after you; and with every living creature that is with you, the birds, the cattle, and every beast of the earth with you; of all that go out of the ark, even every beast of the earth. And I will establish my covenant with you; neither shall all flesh be cut off any more by the waters of the flood; neither shall there any more be a flood to destroy the earth. And God said, This is the token of the covenant which I make between me and you and every living creature that is with you, for perpetual generations: I do set my bow in the cloud, and it shall be for a token of a covenant between me and the earth. And it shall come to pass, when I bring a cloud over the earth, that the bow shall be seen in the cloud, and I will remember my covenant, which is between me and you and every living creature of all flesh; and the waters shall no more become a flood to destroy all flesh. And the bow shall be in the cloud; and I will look upon it, that I may remember the everlasting covenant between God and every living creature of all flesh that is upon the earth. And God said unto Noah, This is the token of the covenant which I have established between me and all flesh that is upon the earth. And the sons of Noah, that went forth from the ark, were Shem, and Ham, and Japheth: and Ham is the father of Canaan. These three were the sons of Noah: and of these was the whole earth overspread. And Noah began to be a husbandman, and planted a vineyard: and he drank of the wine, and was drunken; and he was uncovered within his tent. And Ham, the father of Canaan, saw the nakedness of his father, and told his two brethren without. And Shem and Japheth took a garment, and laid it upon both their shoulders, and went backward, and covered the nakedness of their father; and their faces were backward, and they saw not their father’s nakedness. And Noah awoke from his wine, and knew what his youngest son had done unto him. And he said, Cursed be Canaan; A servant of servants shall he be unto his brethren. And he said, Blessed be Jehovah, the God of Shem; And let Canaan be his servant. God enlarge Japheth, And let him dwell in the tents of Shem; And let Canaan be his servant. And Noah lived after the flood three hundred and fifty years. And all the days of Noah were nine hundred and fifty years: and he died.”