There are two technologies commonly applied to use the sun's energy. Both of them involve panels on roofs, so it is easy to confuse them.
Solar photovoltaics (PV), also known as solar electricity, is a technology that converts sunlight directly into electricity.
Solar water heating (SWH), sometimes also referred to as solar thermal, is a technology that uses sunlight to produce hot water for showers, baths and hot taps.
Theoretically, it is of course possible to heat water using electricity produced from PV panels. However, from an environmental as well as a financial perspective, it is usually much better to use solar water heating panels (see also: Can I use PV electricity to produce hot water?)