Rainbows form when it's raining in one portion of the sky while the sun is shining in another. To observe a rainbow, one must face the rain with the sun at your back. Are you familiar with the saying?"Rainbow in the morning, sailors take warning.
Rainbow at night, a sailors delight."
(Quote taken from Ahrens, Meteorology Today 5th Edition).Since clouds typically move from west to east in the middle latitudes, if you were to see a rainbow, you must be facing to the west, (with the sun behind you in the east).This means that clouds and showers will move eastward and it will probably rain soon. Hence, a "Rainbow in the morning, sailors take warning."But if you see a rainbow in the evening, you must facing eastward towards the rainshower, (the sun is behind you in the west). This implies that the showers will give way to clearing, which is why it is said, "Rainbow at night, a sailor's delight."