Cloudy days:
On cloudy days, your panels continue to generate energy as light is still coming through the clouds. However, since there is less sunlight available, solar energy production won't be as efficient as it would be on clear, sunny days.
Night time:
When the sun is out, solar power is being generated at a faster rate than most homes can use it. That excess power gets sent back to your local utility company and you receive energy credits. These credits are important as they will pay for home's energy usage when solar is not available. This would include night time.
For night time energy use, you have 2 different options:
1. Store excess solar energy in batteries. When the sun goes down, you simply use these batteries to power your night time electricity needs. Batteries are not part of a typical solar system but they can be purchased and installed for backup.
2. Send excess solar electricity back thru the utility grid during the day and buy it back at night using energy credits you've earned. This is the more typical option.