Solar panels convert sunlight into electricity. They do this by using solar cells. These cells are hit by sunlight, freeing electrons in them. This creates electric current for various uses.