Back in the old days pc were relatively polluting and none ever thought about that. Now we know of all the toxic problem related to their making - and their reciclying - so most companies are working on making them more "green".
So what about solar panel ? Are they made with this concepts in mind or are they made just as cheap as possible without taking in account pollution made to make them or not? How long does it takes to make them "greener" or , using math, when this is true ?
"amount of electricity of one panel per day" * "X days" + "pollution produced to make that panel" > "pollution per day of a fossile fuel power plant giving the same amount of electricity"
(i really hope it's readible)
Also you forget that solar panel will not last forever, so depending on the X of the equation above you can make some good assumption rather than running to solar panel because "they told me it's green so it must be".