Which best explains why rainbows only appear when there

is both rain and sunlight present?

Rainbows are optical phenomena that occur when sunlight is refracted (bent) and reflected by raindrops in the air. The sunlight is made up of different colors that have different wavelengths, and when it passes through the raindrops, it gets separated into its component colors. The light then undergoes further reflection and refraction inside the raindrops, leading to the formation of a circular arc of colors in the sky, which we perceive as a rainbow.

Therefore, for a rainbow to appear, there needs to be rain to act as the medium for the refraction and reflection of sunlight. Additionally, sunlight is required for the rainbow's formation because it is the source of the original light that interacts with the raindrops. If there is no rain or sunlight, the necessary conditions for a rainbow to occur are not met, and thus rainbows do not appear.