That's not quite right and I assume you mean ROI and not ROE. It gets a lot more complicated than just $3,000/$38,000.
A true bean counter would use discounted cash flows. For the sake of argument, and to make the math easier, let's assume that the solar panels will still operate at 100% for 20 years and then have to be completely replaced. The current risk-free ROR is roughly 4%. In other words you can take the same $38,000 invest it and get a promised 4%. Initially the panels look like a better deal.
Now comes the factor of risk. What is the risk of rising electricity prices? What is the risk that the prices will fall? If they fall too much then your ROI is actually less than the risk-free investment making this a bad decision financially. What if the panels fail after the warranty expires? On year 10 you now have to dump another $20,000 into your system. There are plenty of other examples and ways to mitigate the risk through insurance, etc.
You also need to evaluate other options. Could one spend less than $38,000 on various other improvements including new windows, insulation, better appliances, etc, and still gain the $3,000/year? If so then that's a better deal.
You can look at the many various ways, including trying to estimate the environmental cost. But that's how a business would decide. For a person this analysis can never quantify the "coolness" factor. I buy plenty of things that are financially stupid but I get a lot of enjoyment out of them and I work hard for it, so who cares.