The output of solar PV (photovoltaic) systems depends largely on solar resources; and the same is true of solar water heaters; the number of hours of sunlight and the angle at which the sun hits the collectors are key factors, that should be properly addressed when installing a solar powered system.
Shade can have a drastic effect upon the energy-efficiency of solar systems, especially on photovoltaic systems.
A small strip of shade along the side of one PV module during key periods of the day can compromise the output of a large part of the array: shaded solar cells can block the normal flow of current from or to other cells...
To compensate it you need to install a larger system, or to move or trim the obstructions (trees, chimneys...), when feasible.
When falling upon a small part of the collectors, shade may not compromise the whole system; shading problems occur mainly in the winter, when the sun’s angle is lowest and the shadows are the longest.
Keep in mind a simple rule: to be effective, solar arrays should benefit from at least 6 hours of sunlight, and if you can’t orient the panels to get it, consider installing the system elsewhere: on the ground, on the top or a garage, on a patio cover... These locations are good alternatives to rooftop installation.
Also consider possible factors such as cloudy mornings and afternoons, or long dusty periods and persistent haze. These type of factors affect the performance of the solar system, and you should try hard to minimize their impact.
The sun’s angle
As mentioned earlier, the angle at which the sun hits the solar collectors has a significant impact on their efficiency; and since the angle varies through the day and the year, you should consider carefully the best approach to this issue.
Most solar collectors are mounted flat on the roof, that is, with the same tilt as the roof; that’s the simplest way to install them, it's aesthetically pleasing, and minimizes the wind load on the collectors and mounting system.
But unless for mere chance, that's not the optimal tilt angle or the best option, even if the collectors face the winter sun. The best angle (for fixed tilt systems) is approximately equal to your latitude, and that’s valid for solar water and solar PV systems. The image on left (from Energy.gov) illustrates it.
In other words: solar panels (on fixed tilt systems) should be mounted at an angle approximately equal to the latitude of the place where you live (some degrees more or less, up to 15%, will not have a big impact).
But there are other ways of dealing with the issue and maximize the performance of solar panels, namely in the case of photovoltaic systems. There are tracks designed to be adjusted periodically, or to rotate during the year or even during the day, following the sun's path . See: Racks and Trackers for Solar Collectors.
Ground vs. rooftop installation
Installing the solar collectors on a rooftop or at ground level should depends on the factors mentioned above: the available sunlight, obstructions, shade, space and the possible use of sun-tracking systems…
Orientation Rule: True North and True South
Solar panels should face true South (Northern hemisphere) or the true North (Southern hemisphere). But you should also consider local climate conditions – foggy mornings, cloudy afternoons... These factors affect the number of hours of sunlight and can have a big impact on the system performance..Mounting the solar collectors on the ground, has the advantage of an easy access and installation, and allows an easier maintenance and seasonal adjustments to the path of the sun, not to talk of sun-tracking systems (designed to increase the output of PV systems).
And it's also a way of overcoming possible problems with roofs: roofs that aren't in good conditions or need to be replaced; roofs that do not have enough space to install a large solar array; or possible roof leaks (in places where the support racks penetrate the roofs) or zoning and building codes issues.
But ground-mounted collectors also have obvious disadvantages: they require space and can be obstructive; and are more exposed to shade or to vandalism.