Solar cells are made of two layers (a positive side and a negative side), when they are placed on top of each other they create an electric field, the same way a magnet does.
A solar panel is an array of solar cells that use photovoltaic technology to convert direct sunlight into direct current (DC) electricity.
Generator systems do not depend on sunlight. They do, however, depend on fuel. If storms or some other disaster hinders one from replenishing the fuel supply, generators also become useless.
It goes without saying that the ability to perform well of a solar power generator is contingent upon the quality of the design, its size and what you utilize it for.
Generally it's worth investigating the economic viability of installing a solar hot water system if you have an electric water heater with utility rates of at least 5 cents per kilowatt hour and have tax credits or rebates available. (It may even be worth changing out a gas-powered water heater if your costs are at least $8/million BTU).
However the biggest issue with solar power is it's reliability. Ideally you need a location that gets plenty of sun throughout the year.
Solar panels are cheap to use because there are no fuel expenses like in electricity generators.
The cost of solar power versus generator is much less over the long term.
In the past solar power has suffered from an image problem which it has just recently recovered from.
Even the tiny percentage of sunlight that touches the earth is plenty to meet the energy and power needs of the entire human population more than 8,500 times over.