It depends on what kind of energy property you installed.
You can claim the Residential Energy Efficiency Property Credit for solar, wind, and geothermal equipment in both your principal residence and a second home. But fuel-cell equipment qualifies only if installed in your principal residence.