Just a few months ago, Yingli Green Energy (NYSE: YGE) and Trina Solar (NYSE: TSL) were two of the hottest names in the solar industry, and the hope was that booming demand would bring a flood of profits to two of the largest solar panel makers in the world. But since March, the stocks have dropped, and recently announced tariffs have done little to stop the bleeding.

YGE Chart

YGE data by YCharts.

The question is where these two companies stand today, and whether or not investors should run for the hills or load up on cheap shares?

U.S. solar tariffs hurt
Both Trina Solar and Yingli Green Energy saw an opportunity last year in a booming U.S. solar market and put on a full-fledged effort to bump up sales. The strategy worked, and in the first quarter, Trina sent 31.9% of its panels to the U.S., and Yingli shipped 24% of its panels here. At the time, taking advantage of one of the world's most attractive solar markets seemed like a great move, but the story has changed.

Demand from the U.S. likely dried up earlier this month, when the U.S. announced beefed-up tariffs on solar panel imports. As it stands right now, Yingli is being slapped with a standard 26.89% tariff while Trina's imports pay a slightly less damaging 18.56% tariff.

In a world where commodity solar panels are easy to come by and pennies separate the cost structure of one company to another, these tariffs are a big deal. Within a matter of hours of the tariffs, SolarCity (SCTY.DL), who was once a big buyer of panels from both companies, inked a supply deal with REC Solar and just last week bought its own panel manufacturer, Silevo.

Chinese solar manufacturers used to be major suppliers to residential installations like these from SolarCity, but they're now being shut out. Source: SolarCity.

Other U.S. buyers will more than likely do the same, and a big chunk of demand will dry up. That's a big blow, if for no other reason than because the number of customer interested in buying panels from Chinese manufacturers just shrunk dramatically, making the supply and demand imbalance worse.

Differentiation is winning
The other thing working against Trina Solar and Yingli Green Energy is competitors differentiating themselves with technology instead of making commodity panels. For example, SunPower, Kyocera, and LG are all differentiating themselves with higher efficiency than competitors in China, who make modules that are around 15% efficient.

SolarCity has differentiated itself with financing that allows solar to be built with $0 down for homeowners and by integrating racking and recently solar panels into its supply chain to reduce installation times. The recent acquisition of Silevo also shows that efficiency, not just cost matters in solar. On the efficiency front, Trina Solar and Yingli Green Energy are both falling behind. That'll only get worse as next-generation equipment is installed and 20% efficient panels become the standard.

Companies who find ways to differentiate themselves and lower energy costs for customers are winning in solar, not just those who can make a panel for less than the competition. More is required in today's solar industry.

A utility scale solar project built in Quinghai, China by Trina Solar. Source: Trina Solar.

A rising tide lifts Yingli and Trina
So far, I've focused primarily on the challenges facing Trina Solar and Yingli Green Energy, but there are opportunities as well. Industry experts predict that by the end of 2014, there could be a shortage of high-quality solar panels because of explosive growth in demand. This is driven by the rapid reduction in the cost of installing solar, and now that the cost of solar energy is below that of the grid in many parts of the world, demand will grow exponentially.

If that happens, not only with Trina Solar and Yingli Green Energy potentially sell out of panels in the second half of the year, prices could go up, leading even Yingli Green Energy to enjoy a profit.

There's not much new capacity coming online in late 2014 or 2015, either, so if demand exceeds supply this year, it will likely do the same next year as well. That could allow both companies the financial flexibility to build new, higher-efficiency capacity and access a new market, remedying the challenges I pointed out above.

Foolish bottom line
Both Trina Solar and Yingli Green Energy face major challenges, and while there's upside potential if all goes well, the downside risk is too much for me. There are higher-quality manufacturers out there who don't face tariffs and are making a consistent profit, and they'll benefit from higher demand as well. Investors simply don't need to throw a Hail Mary to profit from solar, and that's what I think these two stocks are right now.