There’s no weather, there’s no pesky atmosphere, just pure photons streaming from the Sun to harvest for whatever you need. But solar panels are complicated and fragile made of sensitive electronics and glass - not to mention, really heavy. Any spacecraft equipped with solar panels needs to handle the gravity down here on Earth for the construction and testing, then the shaking and high Gs of launch. The solar panels need to unfold perfectly once they get to space. And the total amount of energy you can harvest is limited by the size of your rocket’s launch fairing.