Hello,
certainly the roof orientation is a decisive factor. With a photovoltaic system facing north, the outlook for electricity is rather bleak.
Partly decisive is also the roof shape:
Hip roof (see ) can be covered on the east, south, and west sides, which generates a more balanced yield. However, the yield on the east and west - depending on the season and time of day - will be lower than on the south (keyword: height of the sun). <-- correct me if I'm wrong
With a gable roof, you have "only" two sides to cover - but you can usually cover the roof side more extensively. Ideally, the covered roof side should be oriented south (although I would sometimes wish for a few collectors on the west side if the evening sun shines well there).
Also decisive for the yield are the geographical location, the roof pitch, and - not to forget - the shading from trees, satellite dish, chimney, taller neighboring house, etc. According to information, even small-area shading can lead to an 80% loss of yield of the affected panel.