Founded in 1993 by brothers Tom and David Gardner, The Motley Fool helps millions of people attain financial freedom through our website, podcasts, books, newspaper column, radio show, and premium investing services.

Solar stocks sold off hard on Thursday as China fears crept into the industry.

What: Solar energy stocks took a nosedive today and some of the industry's biggest players are feeling the pain. Canadian Solar (NASDAQ: CSIQ) has dropped 15% late in trading, SunPower Corporation (NASDAQ: SPWR) is down 9% after falling 10% earlier in the day, and JinkoSolar Co., Ltd. (NYSE: JKS) has plunged 18%.

So what: Solar stocks are often correlated to energy prices and that's hurting them today. WTI oil dropped 2.3% to $33.19 per barrel, although natural gas was up 4.8% to $2.38 per million Btu today. As fossil fuel prices fall solar energy becomes less competitive, so that's on investors' minds today.

The bigger driver of solar stocks is likely China's stock market collapse. Canadian Solar, SunPower, and JinkoSolar all generate a lot of demand for solar products in China, which was the world's biggest solar market in 2015. About 18 GW of solar was installed in the country last year and that demand has helped all three companies have the confidence in the market to increase capacity. If a dislocation in financial markets leads to lower demand for solar in 2016 there could be a big dent to earnings.

Image: SunPower.

Canadian Solar and JinkoSolar have also used Chinese state run banks to fund capacity expansions and project financing, so if credit markets slow down or even freeze up in China it could be bad for their businesses. That could be why they're down more than most solar stocks today.

Now what: Long-term, I think today's move is a blip on the radar but the risks in China are worth keeping an eye on for investors. China is expected to be a huge solar market for years to come and if demand falters even a little it could lead to oversupply of solar panels and low margins for solar manufacturers. Low margins are something the industry dealt with between 2012 and 2014 and it wasn't until last year that demand seemed to come more in line with supply, stabilizing solar panel prices.

The good news is that markets like the U.S. and the Middle East are emerging as growth markets for the solar industry, so China could be a blip on the radar. And with clean energy becoming a necessity in China I think solar still has a bright future today. But the market is worried about China and that fear has crept into solar stocks today. But I'm not selling on the short-term dip and with such a bright future in solar I think this is a buying opportunity for investors.