The greenhouse effect traps the sun's energy on Earth similar to D. a car parked in the sunlight with its windows up. This is because the sunlight photons are able to go inside the car through the glass windows, but the infared photons are not able to escape the pane of glass.