Solar panels are used to harness sunlight energy. How could solar panels be used in a house?

A to collect and heat rain water
B to prevent heat from escaping the house
C to absorb heat from the roof tiles to heat water
D to absorb energy from the sun’s radiation to heat wat