Celebrity entrepreneur Elon Musk adds allure to solar-energy operator SolarCity, but there are big questions about government incentives, on which the company relies.

All across America, even atop the White House, homeowners are installing rooftop solar panels. The trend has been propelled not by forecasts for sunnier weather, but in large part by generous government tax breaks aimed at rewarding those who purchase panels and help reduce greenhouse gases.

Few companies have been as adept at capitalizing on Uncle Sam's largess as SolarCity (ticker: SCTY), a San Mateo, Calif.–based company that sells, leases and installs solar systems, and is backed by celebrity entrepreneur Elon Musk....