A short googling tells you very easy how much co2 a solar panel is creating in production.
And yes creating a solar panel is relativly easy and consumes way less co2 per watt than gas or oil.