Solar cells would be much more useful in space than earth's surface because they will receive much more solar energy. If we look at what happens to the total solar energy received by Earth, we find that almost 35% of it is reflected back, 17.5 % absorbed by our atmosphere and 25% is scattered by clouds and blue sky. Only about 22.5% of the incumbent solar energy reaches our surface. This is the fraction that solar cells placed on Earth's surface work with. In comparison, if these were placed in the space, there would be no loss of solar energy (no atmosphere) and they will receive entire 100% of the solar energy. Thus, these cells (in space) would be able to generate more useful energy as compared to cells on Earth's surface.
Hope this helps.