Solar panels are made up of two types of silicon. Sun shines on solar panels. Sunlight goes into the top half of the solar panel. Sunlight travels into the bottom half of the solar panel. The "jump" between the two halves can be used to make direct current. A solar "inverter" changes the direct current to alternating current. Alternating current can be used to power things in your house. 
How do solar panels generate electricity?