Solution

Sunlight (mostly visible radiation) passes through the atmosphere and heats the earth's surface.
The warm earth re-radiates this energy as infrared (heat) radiation of long wavelength.
Greenhouse gases such as $CO_2$, water vapour and methane absorb this infrared radiation and do not let it escape into space, so the earth's surface stays warm.
So the greenhouse effect is caused by infrared rays.

Concept Trapping of infrared radiation

Electromagnetic Waves in past papers

49 questions from this chapter have appeared across 24 exam years.