the on-grid system produce electricity when there is sunshine, and feed the extra electricity to the national grid, when there is no sunshine at night or raining, the house could get electricity from the national grid, so on-grid solar power system always have to meters, one is for selling electricity and the other one is for buying electricity.
for the stand-alone solar power system, the electricity produced by solar panel will charge into a battery system, because the voltage and current from the solar panel is unstable according the sun irradiation, so we need to charge into battery. But still, the electricity from battery is in DC, so we need a dc to ac inverter to produce AC 110V or 220V for our home appliance.
So the batteries will be charged in the sunny day, and could use in the night and raining days.
References :
http://solarphotovoltaic.blogspot.com
An off-grid home will have batteries. For periods of prolonged darkness, they will typically go to a gas-powered generator.
References :