An average U.S. household uses 830 kilowatt-hours of electricity per month. On average,producing 1000 kWh of electricity with solar power reduces emissions by nearly 8 pounds ofsulfur dioxide, 5 pounds of nitrogen oxides, and more than 1,400 pounds of carbon dioxide.During its projected 28 years of clean energy production, a rooftop system with 2-year paybackand meeting half of a household’s electricity use would avoid conventional electrical plantemissions of more than half a ton of sulfur dioxide, one-third a ton of nitrogen oxides, and 100tons of carbon dioxide. PV is clearly a wise energy investment with great environmental benefits! -- https://www.nrel.gov/docs/fy99osti/24619.pdf
Of course, this reasoning is limited to carbon effects only. There are other important ecological concerns that trees might address that solar would not.
According to many sources, but I will cite this one[1] a single tree converts about 50 lbs of CO2 in a year. There are three trees on my property, a city tree (planted by the city) and two Birch trees planed by the original developer. All are deciduous so lose leaves in the winter but we'll give them full credit anyway, so call it 150 lbs of CO2 a year.
My rooftop solar system nominally puts out 5.2 kW of power under full sunlight, although efficiencies cut that down to around 4.8 kW net into the grid. I have over 10 years of data from the system, drilled down though it averages out to about 4.5 "solar hours" per day with an average daily output of about 22 kWH per day or about 8 MWH per year.
The US Energy Information Association (EIA) tracks a number of statistics, but the one that is most relevant is the number of metric tons of CO2 per MWH per state. You can see California's number in this report : https://www.eia.gov/electricity/state/california/ is 474 lbs per MWH.
Using that number, my rooftop solar system "saves" (which is to say doesn't generate) about 3,792 lbs of CO2 a year. Which, is way more than the 150 lbs a year the trees are taking out of the air. This is why the 1.2T trees, or 160 per person, is such a large number. A family of four would need to plan 640 trees on their lot, which would remove 32,000 lbs of CO2, which is a lot. To match my solar panels I would need to plant an additional 76 trees.
What you can take away from that is that solar panels in places where you can't put trees are a solid alternative. And planting trees rather than letting unused land sit idle as a field of grass is also a good plan. As a home owner, solar, even in places where it won't generate all your energy needs, will help cut CO2 emissions.
[1] https://projects.ncsu.edu/project/treesofstrength/treefact.h...