The correct option is D Both A and B
Rainbow occurs due to reflection and refraction occurring from water droplets present in air. So, to see rainbow, it should have rained and the Sun should be present.
At the same time, the Sun should be behind the observer. If it is otherwise, only glare of Sun will be felt and no rainbow will be observed.