Of course, sometimes the angle of the sun means that your whole subject is in shadow, which is not ideal. Fortunately, the position of the sun moves during the day. It rises in the east (or thereabouts) and sets in the west (or thereabouts). So if you have the time, you can stay in one place all day and wait for that special moment when everything is perfect.
Of course, if you are travelling and passing through a place, it might not be possible to return when the conditions are better suited to photography.