Solar panels can cut your electricity bills by generating renewable energy at home using sunlight – and, contrary to popular belief, they don’t need gloriously sunny days to work. Even on cloudy days, solar panels can still turn daylight into usable electricity to power your home directly, charge a battery for later, or be sold back to the national grid.Solar panels have been around for decades, but only in recent years have their costs fallen (and aesthetics improved) to the point where, for many households, the installation cost isn’t the barrier it once was. They are also more durable than ever, with many manufacturers now offering 25- or 30-year performance warranties.But how exactly do solar panels work, what happens to the electricity they produce, and are they worth it for your home? This guide explains solar panels function, where they can be installed, and what you should consider before adding them to your home. Read more: Best solar panels, compared Use our comparison tool to get a range of free quotes from leading solar panel installers across the UK.Solar panels convert energy from sunlight into electricity you can use at home. Most domestic systems use photovoltaic (PV) cells that are made from layers of semiconducting material, typically silicon. When photons from daylight strike the cell, they transfer their energy to electrons in the material, causing them to move. This movement creates an electric current, which passes to an inverter that converts it from DC (direct current) to AC (alternating current), the type of electricity used by household appliances.The electricity generated can be used immediately by anything plugged into your wall sockets, stored in a battery if you have one, or exported to the electricity grid.On an especially sunny day, or if you have a large solar panel installation, you might end up with surplus power. Ideally, this is stored in a battery and used later – an approach that is particularly effective if that stored energy is used when electricity prices increase during peak demand.In ideal circumstances, this could mean filling a battery with spare electricity during the day, then using that energy to charge your electric car at night.If you don’t have a battery, you can sell excess energy to the national grid – this is handled by the Smart Export Guarantee (SEG). But energy suppliers set their own export tariffs and eligibility requirements, so the amount you’re paid for that surplus energy varies between providers.Phil Steele, future technologies evangelist at Octopus Energy, explained: “I much prefer it when batteries are paired with solar, because you’re storing your own energy to use later on...If you store that in your battery, then you can use that for free, effectively, instead of buying grid energy… You forego the, say, 15p you could have got from exporting it, but you're not then having to buy it back again at 27p.”Solar panels are suitable for many UK homes, but how much electricity they generate depends on your property – its location, sun exposure and roof space, among other variables – and of course your budget. Before installing a system, here’s what you should consider:Roof space: The Energy Saving Trust says a typical domestic solar installation measures about 4.5 kWp, requiring around 12 panels spread across 20 to 30 square metres of suitable roof space.Orientation and angle: A south-facing roof is often ideal in the UK, but east- and west-facing roofs can also work well. The aim is for decent daylight exposure across the day. North-facing roofs tend to be less productive, but that doesn’t necessarily rule them all out.Shading: Trees, nearby buildings and other obstructions can reduce the amount of electricity your panels generate.Roof condition: Your roof needs to be in good condition to support the panels and their fixings. If substantial repairs or replacement are due soon, this should be done before installing solar panels.Planning restrictions: Most UK homes do not need planning permission for solar panels, since they usually fall under permitted development rights. Different rules can apply to listed buildings, conservation areas and some other properties.A strip placed at the bottom of solar panels can prevent snow accumulation (iStock/ Getty Images)Do solar panels work in winter and on cloudy days?Yes, solar panels work in winter and on cloudy days. It is important to remember that solar panels don’t need blazing sun to work. They generate electricity whenever there’s daylight, including on cloudy or rainy days. The trade-off is output: in heavy cloud, you’ll typically see significantly less generation than you would on a clear day.On heavily overcast days, output can fall to around 10 to 25 per cent of what’s possible in ideal conditions. But this figure can vary significantly with cloud thickness. Solarable, a UK website for finding solar panel installers, says output can fall to between 50 and 80 per cent during a bright overcast day, and to between 25 and 50 per cent on a moderate and uniformly grey day.For more on this, see our guide to how solar panels work in winter and on cloudy days.No, solar panels don’t generate any electricity at night, because there’s no sunlight to convert.In an ideal setup, electricity generated and stored in a battery during the day can be used to run your house (including charging an electric car or powering appliances like dishwashers) at night without buying electricity from the grid.They do, but there’s a slightly counterintuitive twist.Solar panels love light, but not heat. Hot weather can reduce solar panel efficiency because the process of converting light into electricity becomes less efficient as temperatures rise.The key figure is 25C: the temperature at which solar panels (and specifically their cells) are rated under standard test conditions. As the cells become hotter, their power output gradually falls. How much they are affected by high temperatures varies between panel models – manufacturers explain this by using a temperature coefficient, which states how much output is lost for each degree above 25C.The practical takeaway for UK homeowners is that during a heatwave, days are usually bright and long, so you can still generate a lot of power overall, even if the system is slightly less efficient at peak temperatures.Read more: Do solar panels perform better in a heatwave?When researching the best solar panels for your home, where you can install them matters just as much as the brand and model. Most domestic solar panel systems are mounted on the existing roof, but this isn’t the only option.Panels can also be installed on the roofs of suitable garages, carports, extensions and other outbuildings, or even mounted to frames installed on the ground – but the latter can be subject to planning restrictions. Naturally, wherever they are installed, the panels need good access to daylight and should ideally be positioned where shading by trees and buildings is limited.Your installer will assess the possible locations on and around your home before recommending the best option for generating the most electricity.Yes, solar panels can be installed on flat roofs. Instead of lying flat against the roof, they are usually fitted to angled frames to maximise sun exposure, with gaps between rows to limit shading.An angle of around 30 to 40 degrees is considered ideal for solar generation in the UK. But while still tilted, flat-roof installations may use a shallower angle, depending on factors like available space, shading and wind loading. Your installer will also need to check the roof and its structure can support the extra weight of the panels and mounting system.Do you still pay for electricity if you have solar panels?Yes. You’ll still pay your electricity supplier’s standing charge and buy electricity from the grid when your panels aren’t generating enough for your needs. A battery can reduce this by storing surplus electricity for use later.Why is it difficult to sell a house with solar panels?It isn’t always difficult, but a solar panel installation can add complexity if it isn’t owned outright. Leased or financed systems may need to be settled or transferred when the property is sold. Missing installation certificates and warranties can also cause problems.Read more: Do solar panels add value to a house?How many solar panels do I need to run a TV?Solar panels supply electricity to the home as a whole, rather than to individual appliances. Generally speaking, a modern 400W solar panel operating at its rated output can produce enough electricity to run several typical LED televisions at once.Do I need permission to install solar panels?Solar panels can usually be installed without planning permission. Restrictions can apply to listed buildings and conservation areas, so check with your installer and local planning authority if unsure.What do kW, kWh and kWp mean?There are a couple of units worth knowing, namely kilowatts (kW) and kilowatt-hours (kWh). Battery capacity is measured in kWh, just as it is with electric cars, while the power solar panels produce is measured in kW. You’ll also see kWp, which stands for kilowatt peak – the maximum rated output of a solar panel system under standardised test conditions. Real-world output tends to be lower and varies with factors like sunlight, temperature and shading.Phil Steele, Future Technologies Evangelist at Octopus Energy, says it helps to think of solar generation in terms of both power and energy. “It’s like water,” he explains. “You’ve got the flow rate, which is kilowatts, and then the actual volume over time, which is kilowatt-hours.”