The days of coal's dominance is over and now renewable energy is the fuel of the future. The trajectory of falling costs for solar and growing installations will amaze you.

Energy in the 21st century is already turning out to be very different from energy in the 20th century. Coal plants that used to provide most of the country's electricity are being shut down by the hundreds and renewable energy is becoming more cost efficient and prevalent by the day.

The trends are heavily in favor of renewable energy, and solar energy in particular is taking the U.S. and the world by storm.

Wind and solar power have both grown this decade but wind generates much more power.

Renewable energy becoming a big player Since 2007, electricity generation from coal has fallen 24.9% from 2.02 billion MW-hrs to 1.51 billion MW-hrs in 2012. Meanwhile, over the same time frame wind grew 309% to 140.8 million MW-hrs and solar grew 607% to 4.3 million MW-hrs. That doesn't include distributed solar on residential rooftops or any installations from 2013, which was a record year for solar, installing about 4.4 GW in the U.S.

Of course, renewable energy from wind and solar is still only about 3.2% of total electricity produced but you can see that the trajectory for renewable energy is only moving higher.

Drivers of renewable energy growth While electricity generated from wind is much larger than solar today, it's not the future of renewable installations. Most of the easily and economically developable wind resources in the U.S. have been exploited and costs aren't falling as rapidly as they are in solar.

The solar industry is where there's high potential because solar power has the potential to provide enough electricity for the entire country and costs are still falling rapidly. You can see below that utility scale projects are less than half of what they cost in 2010 and residential projects are about one-third cheaper. If we go back even further, the cost of a solar panel 35 years ago was more than $100 per watt and today you can get one for around $0.65 per watt, a cost reduction of more than 99%.

Source: GTM Research.

To put today's costs into perspective, a solar power plant will generate optimal energy about 20%-25% of the time, meaning that each watt will produce about 1.75-2.19 kW-hrs of electricity each year. A utility scale project with a 10% return on investment would create electricity for 9.3 to 11.7 cents per kW-hr without subsidy. That compares to an average price of 9.6 cents per watt overall in the U.S.

The driver of coal's declining role in electricity and the growth in renewable energy -- particularly solar -- is economics. As costs continue to fall, we'll see more growth for renewable energy and you can make money off the trend.

How you can make money off growth in renewable energyWith all of the trends I've pointed out above, you can see that renewable energy has a bright future. Solar power in particular is an attractive market for investors.

Three companies leading the way are First Solar, SunPower, and SolarCity. First Solar is a world-class utility scale project builder and still the most profitable company in the industry. SunPower makes the industry's most efficient panels and builds both giant solar farms as well as small residential projects. SolarCity is the dominant residential solar player, making going solar accessible for millions of Americans.

As the industry grows, these three companies will be major beneficiaries. The future of energy is in these cleaner sources of power that are suddenly economically viable as well. They will dominate energy in the 21st century and that's where I think you should be looking to invest.

Fool contributor Travis Hoium manages an account that owns shares of SunPower and personally owns shares and has the following options: long January 2015 $5 calls, long January 2015 $7 calls, long January 2015 $15 calls, long January 2015 $25 calls, and long January 2015 $40 calls. The Motley Fool recommends and owns shares of SolarCity. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.