The conversion of sunlight into electrical energy through the use of solar cells.