What would you have to do to power your house with solar energy? Although it's not as simple as just slapping some modules on your roof, it's not extremely difficult to do, either.
First of all, not every roof has the correct orientation or angle of inclination to take full advantage of the sun's energy. Non-tracking PV systems in the Northern Hemisphere should ideally point toward true south, although orientations that face in more easterly and westerly directions can work too, albeit by sacrificing varying degrees of efficiency. Solar panels should also be inclined at an angle as close to the area's latitude as possible to absorb the maximum amount of energy year-round. A different orientation and/or inclination could be used if you want to maximize energy production for the morning or afternoon, and/or the summer or winter. Of course, the modules should never be shaded by nearby trees or buildings, no matter the time of day or the time of year. In a PV module, if even just one of its cells is shaded, power production can be significantly reduced.
If you have a house with an unshaded, southward-facing roof, you need to decide what size system you need. This is complicated by the facts that your electricity production depends on the weather, which is never completely predictable, and that your electricity demand will also vary. Luckily, these hurdles are fairly easy to clear. Meteorological data gives average monthly sunlight levels for different geographical areas. This takes into account rainfall and cloudy days, as well as altitude, humidity and other more subtle factors. You should design for the worst month, so that you'll have enough electricity year-round. With that data and your average household demand (your utility bill conveniently lets you know how much energy you use every month), there are simple methods you can use to determine just how many PV modules you'll need. You'll also need to decide on a system voltage, which you can control by deciding how many modules to wire in series.
You may have already guessed a couple of problems that we'll have to solve. First, what do we do when the sun isn't shining?