We get asked often if solar panels have to go on the roof. Although the roof is a great location for mounting solar modules, they can also be mounted on the ground or in other architecturally integrated ways, such as carports.
Ground mounted systems tend to cost slightly more than roof mounted systems because of the need for trenching, concrete footings and (typically) a steel substructure. That said, ground mounted systems are very viable and common because they are always designed at the optimum angle towards the sun, maximizing the efficiency.