Earlier this month, semiconductor equipment manufacturer Applied Materials(NASDAQ:AMAT) stock took a hit when it announced that second-quarter income fell 26%. More ominously, company officials suggested that things could worsen throughout the year and orders could ultimately decline in the third quarter.

It’s hard to be optimistic about a company when such dark clouds are hanging over it, but just like your mom always said when you were little (and as my own mother still says to this day), sunnier days are ahead -- all you have to do is look for the silver lining in the clouds.

Looking on the bright side
This cheery outlook is deserved in Applied Materials’ case, because hidden amidst its gloomy semiconductor numbers was the announcement that revenue from its solar-panel business had almost doubled.

Is this a one-time anomaly? No. Last year, I wrote about the company’s $250 million deal to supply Moser-Baer India with equipment for a thin-film plant in India. More impressive still was the announcement this past February that Applied Materials had received a $1.9 billion order from an undisclosed foreign private company to purchase machinery for a one-gigawatt scale factory.  It was the largest sales agreement in company history.

Both announcements are especially noteworthy because they speak to how fast the market for thin-film photovoltaics is growing. Although officials at Applied Materials are quick to point out that it still sells a majority of its solar equipment into the crystalline solar market, the growth rate for the market for its thin-film equipment could reach around 100% a year.

A shining future
Solar energy still isn’t cost-competitive with grid electricity, but it is catching up fast. As it does, I expect a number of companies, including such heavyweights as Suntech Power (NYSE:STP), General Electric (NYSE:GE), and BP (NYSE:BP), to move aggressively into the thin-film space.

As they and a growing number of other private and mid-sized solar producers -- such as Uni-Solar, a subsidiary of Energy Conversion Devices (NASDAQ:ENER) -- do so, investors can expect even more deals for the company. It will take some time for the company to recognize the revenue from these sales, but it is clear to me that Applied Materials’ solar equipment business will make up an increasing portion of its overall revenue in the future.

Combine this fact with the possibility that its cyclical semiconductor business may also reverse its trend at some point, and I see much sunnier days ahead for the company.

Interested in other solar-related Foolishness? Check out these articles: