This year has been full of turmoil and transition for GT Advanced Technologies (Nasdaq: GTAT). Revenue has been down in 2011 both quarter over quarter and year over year as the company grapples with slowing demand from key markets.

But the company continues to post profits, and with products improving constantly, it plays an important role in both the solar and LED markets. Here is my take on what happened this year and why the company has fallen out of favor with investors.

Feeling the solar market pain
The oversupply of polysilicon and modules in the solar market this year has trickled all the way down to equipment suppliers like GT Advanced Technologies. In past years, the company has enjoyed tremendous growth on the back of expanding manufacturing from the likes of Trina Solar (NYSE: TSL) and LDK Solar (NYSE: LDK), but growth came to a screeching halt recently.

Throughout 2010, demand kept up well with the expansion in supply; but in 2011, feed-in tariff cuts in Europe and tight credit markets have put a damper on demand. Module prices plummeted and so did the price of polysilicon, GTAT's bread and butter.

This creates some near-term challenges and some long-term opportunities for the company. In the very near future solar manufacturers will try to find demand for the equipment they already have, which would likely lead to low demand for new equipment.

Long-term manufacturers have to lower costs and increase efficiency, which will require new equipment. GT Advanced Technologies estimates its new equipment can make polysilicon for an all-in cost of $25 per kilogram and a cash cost of $18 per kg. The company is also looking to launch new technology with HiCz N-Type poly in 2012 or 2013, which will increase cell efficiency 22%-24%.

Expanding beyond solar
One of the major developments for GT Advanced Technologies this year is a major expansion into the sapphire business, but it hasn't come without some turbulence as well. Sapphire pricing has taken a downturn similar to polysilicon prices this year in two-, four-, and six-inch cores.

But there could be a silver lining, because LED demand is expected to grow rapidly in the next few years as Asian manufacturers ramp up lower-cost supply. For now, equipment manufacturers like GTAT, Aixtron (Nasdaq: AIXG), and Veeco Instruments (Nasdaq: VECO) are dealing with tight demand and falling stock prices as a result.

GTAT is taking a two-pronged approach of providing production equipment substrate materials to manufacturers in the LED market, and in the industrial market GTAT is selling sapphire materials to customers. So far in 2011, the company has only recognized materials revenue, although that will soon change with 140 ASF units already shipped to customers.

It's in this space where GTAT sees a very bright future. As of Oct. 1, it had $955 million in sapphire back orders, $944 million of that in ASF units.

A key objective in 2011 has been diversification from reliance on the solar market, and despite rapidly changing dynamics in both sapphire and PV, the company should be set up well for the future.

Paying back investors
Despite the market's reluctance to see value in GTAT shares, the company is investing back in itself. It has a $100-million share repurchase program under way, and recently accelerated the purchase of $75 million under that authorization.

Share buybacks aren't always a good idea, but with shares trading at 4.6 times trailing earnings and 4.5 times forward estimates, this is an excellent use of cash in this Fool's opinion.

Ending the year with uncertainty
The problem with going all-in on GT Advanced Technologies right now is uncertainty in its two major markets. The company has a fabulous backlog of $2.1 billion, including $1.244 billion in unshipped orders, but the markets in both PV and LEDs are becoming saturated.

The falling stock prices and disappointing sales of suppliers like Cree (Nasdaq: CREE) and JA Solar (Nasdaq: JASO) are canaries in the coal mine in the LED and solar markets, respectively.

Then there's the uncertainty about possible tariffs on Chinese solar products, which could bring a backlash to U.S.-manufactured products like those of GTAT.

The year is ending with even more uncertainty than it began with, which may create opportunities for aggressive investors, but the risks are too big to ignore entirely.

Interested in reading more about GT Advanced Technologies? Click here to add it to My Watchlist, and My Watchlist will find all of our Foolish analysis on this stock.