Answer:
The solar waves (especially waves below the visual spectrum - ultraviolet waves) penetrate the carbon dioxide (also methane) layer and then the heat created by these waves is trapped by carbon dioxide layer causing an imbalance in the heat received by the earth and the heat radiated back into space by the earth.
Destruction of the ozone layer in the upper atmosphere allows energetic UV particles to reach the earth that would normally be trapped in the upper atmosphere.