It will continue to be a good idea as long as Fed and State governments continue to rob Peter of his tax money to pay Suzy Solar to install panels. When the “public financing” schemes end, the economic viability of solar ends with it.
Solar water heating on the other hand, pays off. I've been heating our hot water with solar for about 15 years.
100% in the summer 50% or so in the winter, with some small percentage heating the house too in winter.