Solar energy is a type of renewable energy that harnesses the power of the sun to generate electricity. This is done through the use of solar panels which convert sunlight into direct current (DC) electricity.