Monday morning, SunEdison (SUNE) became the most active stock listed on the U.S. exchanges. But it wasn't because of some hot new product or positive outlook from analysts. Instead, investors are fleeing in panic of impending bankruptcy.

Once a hot stock, SunEdison is now toxic and should be avoided at all costs. But should the solar sector as a whole also be shunned?

During four of the last five sessions of open trading, SunEdison has lost a whopping 50%. Within the first 45 minutes of trading yesterday, investors dumped more than 50 million shares, according to FactSet.

On Friday afternoon, The Wall Street Journal reported that SunEdison was preparing to file for bankruptcy protection, noting also that the company had a market cap of as much as $10 billion last July.

A terminated takeover of rooftop panel installer Vivint Solar never sat well with investors. But also unsettling were a broad selloff for energy stocks thanks to plunging oil prices and worries about the company's ability to finance its acquisitions.

In addition, SunEdison is facing investigations from two federal agencies: the SEC, which is questioning whether the company overstated its liquidity as its share price dropped last fall and the Justice Department, which is seeking more information about SunEdison's financing activities regarding the failed Vivint takeover.

But the outlook for solar isn't all overcast. Two companies, First Solar (FSLR - Get Report) and SunPower (SPWR - Get Report)  have potential for growth and profits.

Technological advances in the manufacture of solar cells have made units less expensive for consumers. Coupled with continued government tax breaks, this is leading to forecasts for global solar demand to double to over 100 gigawatts in the next four years.

Both companies have healthy balance sheets -- First Solar with $1.5 billion and SunPower with $1 billion in net cash. And together the two companies own a healthy yield company -- that is, a company created to own their operating assets -- called 8point3 Energy Partners (CAFD) .

However, SunEdison's market cap is currently teetering below $67 million. From a 52-week high above $33, its stock is now priced at a mere 21 cents. Caught in a mounting waver of debt and plagued by executive hubris, SunEdison is a dangerous, inherently weak stock that should be shunned. If you own it, dump it.

Do we face a repeat of a 2008-style debacle? You need to prepare now, by weeding out the fundamentally flawed stocks that could ruin your portfolio. Here's a report on the world's most dangerous stocks. These equities are poised to collapse; don't get left holding the bag. To download your free copy, click here.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.