Yes, solar panels can qualify for a tax credit.

How much:               30% of the cost (including installation costs), with no upper limit (Credit decreases to 26% for tax year 2020; drops to 22% for tax year 2021)   

Tax credit in effect through 2021

Must be installed in a home you own and use as a residence (no rentals, but second homes qualify) between January 1, 2009 and December 31, 2021.     

Details: Photovoltaic systems must provide electricity for the residence, and must meet applicable fire and electrical code requirement.  
How to apply:

File Tax Form 5695 with your tax return