Yes, solar energy can be used for both heating and cooling. Solar thermal systems capture sunlight to heat water or air, while solar-powered air conditioning systems convert solar energy into electricity to cool your home.