Wal-Mart (WMT 1.32%) isn't known as a company with an eye on the environment, but it's quietly become one of the largest renewable energy producers in the world. Its latest Global Responsibility Report highlighted just how much the company is using wind and solar power to provide electricity.

Renewable energy provides 21% of Wal-Mart's electricity globally, driven by a growing number of solar installations. The company has already built 200 solar projects across the U.S., and a recent agreement with SolarCity (SCTY.DL) to add solar to 60 stores in California will grow its solar presence. A distribution center in California has a 1 MW wind turbine and there are two more utility-scale wind projects and two micro-hydro projects under way.

Sustainability and energy efficiency are driving some of these moves, but so are economics. The rooftop spaces on Wal-Mart's stores and distribution centers are unproductive assets without solar power -- solar is a way use this space productively and generate power on-site. In locations where blackouts are common this development could keep the lights on when the rest of the neighborhood goes dark.

It's also becoming very economical to use solar power. SolarCity offers zero-down installations and there's a positive return on investment for projects that Wal-Mart pays for itself. As the costs of solar modules and installations fall it will become more and more economical and make use of otherwise unused real estate.

Wal-Mart isn't the only company putting up solar at a rapid rate. The Solar Energy Industries Association has Wal-Mart first for corporate solar installations followed by Costco (COST 0.17%) and Kohl's. Costco is another profit-focused enterprise that doesn't seem like a natural fit for solar but the economics are too good to pass up.  

If Wal-Mart and Costco see solar and even wind as ways to build more sustainable businesses you can be assured that other companies will follow. The U.S. has only recently become a hotspot for solar investments and large rooftops like these two companies have will be major points of installation in coming years.