I mean yes, but what’s genuinely problematic is the variability of the sun. Since it doesn’t shine at night, you have to store the energy generated during the day somehow. What about winter, especially in parts of the world where it lasts a very long time? How can we transfer the energy generated in, say, the Sahara desert, to Svalbard? Solar is great for generating electricity, but storage and transport of said energy is not complety resolved, yet.
That isn’t really a problem for where many people live though, nor for very long, so some modest storage medium and transmission lines (which likely already exist to many places dark in the winter) coupled with wind or whatever else makes sense locally would be just fine for those locations where it is a problem. There’s no need to transmit from the Sahara to islands at the poles either, there’s so much sun to go around, and so many places to gather it.