In general, consumer loan interest (personal loan) is not tax deductible.
Did you get a home equity loan to pay for the solar panels? If so, yes. The interest is deductible.
Per Tax Topics - Topic 505 Interest Expense - IRS.gov
Types of interest deductible as itemized deductions on Form 1040, Schedule A (PDF), Itemized Deductions, include:
Types of interest not deductible include personal interest, such as:
My question is in regard to purchasing solar panels on a farm owned by my electric service. My home electric bill will be reduced by credits generated by the solar panels. The contract can be transferred to a subsequent buyer. The interest would be charged from a home equity loan. The purchase would be with funds from the home equity loan.
Beginning in 2018, interest on a home equity loan or line of credit is only deductible if the loan was used to "buy, build or substantially improve" the home that secures the loan. You cannot deduct interest on a loan used for other purposes, such as the installation of solar panels.