God brought great judgment through the rainstorm (a very large and destructive storm). Now he gives the rainbow as a sign of peace for the whole earth (see 9:17). The rainbow appears after the rainstorm and is connected to it, but it now shows that God will not destroy the earth in this way again.
The same Hebrew word can mean both “rainbow” and “bow” (a weapon used in war). In some places, God is described as a warrior who shoots arrows to bring judgment (see Deuteronomy 32:42; Psalms 7:12; 18:13–14; Habakkuk 3:9–11). Because of this, some interpreters think the picture in Genesis 9:13–17 shows God hanging up his bow. This means he is putting aside his weapon of judgment and choosing peace instead.