Well, solar panels work best when orientated close to the sun. But even on the moon at an angle the light direct from the sun would could/strike them. There is also some dispersal of light on the moon when it bounces off the surface.
Interestingly, there is an area at the top of the moon where it is always light, so you could stick panels there and just rotate them. It would be a lot more power than arrives on the earth's surface, but transfering the powet TO earth is another thing altogether.
Dave L