Considering that were there no source of heat, all of the atmsophere would have solidified and stratified across the globe, sure, if there were no Sun there would be no atmosphere. Beyond that you have as much point as your saying that "without gravity there would be no atmosphere" which is also correct.
The sun prompts plants to produce oxygen, not CO2. Termites eat plants and release sequestered CO2, sure. The question is, how has the sun increased the CO2 content of our atmosphere in the last 200 years where it did not before. That question no one here has managed to answer.