The atmosphere acts as a filter for incoming energy and an insulator for escaping energy. The gases don’t cause anything because they are passive.
How does an insulator work?