I actually worked for a bank that helps people finance solar panels.
There are two possibilities going on here and you didn't specify which one you're dealing with. 1: they work with a company that installs the panels, gives them free solar energy, and then sells the excess. They are leasing the panels from this company. You won't own them. I *do* believe, however, that this company will repair any damages and maintain the panels for you.
Another option is that they purchase the panels and leave them behind for the next tenant. This *can* raise the desireability of your property, especially if you're in a state like California where the electric bills are really high. I believe in this scenario you would be the one who collects the tax breaks, since you're the one who owns the property.
There is a third option, and you should make sure you don't fall into this one. That is that they 'finance' the solar panels with a PACE loan, where the panels are paid for with the property taxes (i.e. you pay for it). It doesn't happen often, but it can happen that the contractor and the bank don't due their due diligence and they are able to get the financing without being property owners. This is the bank I worked for, and we were constantly kicking contractors off the program for not ensuring the people creating the loan were actually authorized to do so.
I'd say it can be a good investment if it's something that your market can support, but in general think of it like a pool. Is it worth the extra hassle, repair, etc.? Will it be a big enough draw to offset all of the issues it may have and the amount of research you should do just to make sure you're not left holding onto something you don't want? If so, go for it. If not, I'm sure your tenants will understand.