Solar power is generated from solar panels made of cells that produce a flow of electrons when sunlight hits layers with different numbers of electrons. It can be used as a source of heat or electricity, with benefits of no pollution, but drawbacks of high upfront costs for solar cells and inability to operate at night or when the sun is obscured by clouds or rain. Placing solar panels in space could overcome limitations of weather.