In hot weather/hot climate it's helpful to have it in shade. If you're working (like flipping the pile) or playing with your compost in hot weather you'll be grateful for a little shade. In a cool climate, it probably doesn't matter.
In really it doesn't matter a whole lot in the process itself. Whatever makes you happy. Compost will happen anywhere. The real heat in compost comes from the action of microorganisms, not much from the sun. On the other hand, hot sun
can cook you.
Karen