For example, Sunroof estimates that a 5.75kWh system would cost $21,500 before subsidies (about $15k after, but we're ignoring that), and that it will save you (gross) $60,000 over 20 years in utility bill costs. You can either:
a) Invest that capital. At a stable 7%, after 20 years, your balance would be about $86.8k.
b) Purchase a solar system for that $21.5k, and invest the difference on your power bill each month. Assuming a base power bill of $200, and the 2.2% annual rate increase that Sunroof uses, you would invest $2400 the first year, $2452.80 the second year, etc. At the same 7% return, then in 20 years your investment balance would be $122.8k, and your power bills would continue to be $0. Remember, these numbers assume an unsubsidized system.
The gain comes from the fact that after the break-even point (at year 12), you are continuing to invest your power bill equivalent, rather than paying it to the power company, whereas in the non-solar case, the increased power bill will never earn you a return.
The downside is that it (with those numbers) takes 12 years for you to come out ahead, and solar tech is moving so fast that the opportunity cost of committing capital to solar today rather than investing it and then liquidating that investment tomorrow to pay for a cheaper and more efficient system may be substantial, but is arguably specifically unknowable. If you don't offset your full cost, the numbers change a bit, as well (but you can certainly compute what happens at a 50% offset for a smaller upfront capital investment easily enough, as well). There are certainly scenarios in which solar is viable unsubsidized today, though.
Feel free to check my math and assumptions: https://docs.google.com/spreadsheets/d/1JoJxX5t7VmRhV1LDI1UF...