A solar panel is made up of photovoltaic cells. These cells are used to convert the energy provided by the sun into electricity. The cells are placed between layers of silicone or other material that is semi-conducting. All the layers have different properties that are boosted when the photons from sunlight reach them. This creates an electric field. It is this process that can produce the current that is required to create electricity.
The solar panel itself will create a direct current. The system then sends it through an inverter so it can be changed into an alternating current. Once this process has been completed the electricity can be used by the home or sent on to the National Grid.
Solar panels operate very well on sunny days, but the panels are now also designed to operate on fairly dull days. As long as you have enough light to be able to see what is going on around you, the panel should be working reasonably well and will be generating electricity. It does not necessarily have to be hot weather for the panel to work well, either, although it is noted that they will generally produce more electricity in the summer.