Humans have a good 500 million years left to enjoy the sun's energy source before it develops into a giant red star and devours Earth. In the meantime, the sun's solar rays could provide the world with its greatest electrical source by mid-century.

A new report shows solar energy could be the top source of electricity in the world by 2050, according to the International Energy Agency (IEA). Solar photovoltaic (PV) systems could generate 16 percent of the world's electricity and another 11 percent from solar thermal electricity (STE) from concentrating solar power (CSP) plants.

The solar panels of the PV system absorb and directly converty sunlight into electricity and then a solar inverter changes the electrical current from DC to AC. Solar thermal energy is used to power residential and commerical areas.

Solar energy will supply more electricity than fossil fuels, wind, hydro or nuclear energy sources by 2050. The shared responsibility of powering the Earth could help stabilize costs for generating electricity in the long term, according to the IEA.

"The rapid cost decrease of photovoltaic modules and systems in the last few years has opened new perspectives for using solar energy as a major source of electricity in the coming years and decades," said IEA Executive Director Maria van der Hoeven.

The upfront costs for both technologies are still high and the goal is to lower "the cost of capital... for achieving the vision in these roadmaps," Van Der Hoeven said.

The IEA's two "technology roadmaps" for solar thermal electricity and solar photovoltaic energy do not represent a forecast, but a roadmap to achieving the 2050 prediction. It will depend on technology improvement and policy actions.

"Where there is a record of policy incoherence, confusing signals or stop-and-go policy cycles, investors end up paying more for their investment, consumers pays more for their energy, and some projects that are needed simply will not go ahead," said Van Der Hoeven.

China leads the way in PV expansion followed by the United States. The United States has a wide STE system with Africa, India and the Middle East having the best opportunity to expand the technology, according to the IEA.