Caused by the reflection and refraction of the rays of the sun shining on falling rain. It was appointed as a witness of the divine faithfulness (Genesis 9:12-17). It existed indeed before, but it was then constituted as a sign of the covenant. Others, however (as Delitzsch, Commentary on Pentateuch), think that it "appeared then for the first time in the vault and clouds of heaven." It is argued by those holding this opinion that the atmosphere was differently constituted before the Flood. It is referred to three other times in Scripture (Ezekiel 1:27,28; Revelation 4:1-3; 10:1).
These dictionary topics are from M.G. Easton M.A., D.D., Illustrated Bible Dictionary, Third Edition, published by Thomas Nelson, 1897. Public Domain, copy freely.
Easton, Matthew George. "Entry for 'Rainbow'". "Easton's Bible Dictionary".