Solar Panels generate electric energy out of sunlight. Usually they are constructed from a semi-conductor such as silicon. Solar panels are frequently used in space primarily for satellites and space stations in Earth orbit and is the prime source of energy for Mars satellites, landers and rovers. Solar panels begin to lose usefulness for deep space and outer solar system missions (i.e. the Cassini mission to Jupiter or the Voyager program) where nuclear reactors are a favoured (if controversial) means to generate electricity.
On Mars the sunlight is bright enough to use solar panels. The famous rovers Spirit and Opportunity have them. The experiences are terrific: Since July 2003 they are working fine, and the martian winds have a good cleaning effect on the surface.