Fertilizer companies convert phosphorus, nitrogen, and potassium into chemicals that may be used to help plants grow. In the US, corn crops use approximately 45% of the total available fertilizer. This is more than the combined 29% that wheat, soybeans, oilseeds, fruit and vegetables use. The remaining 26% is used by other crops and uses such as pesticides.
When there is a gap between crop supply and crop demand there is often an opportunity for a farmer to sell more product to meet demand. Profit seeking farmers will buy fertilizer when is it financially prudent to do so. By
Three main factors influence US fertilizer companies:
From 2007 to the summer of 2008, fertilizer companies saw triple digit returns due to skyrocketing oil prices, the growth of emerging markets, and a severe worldwide food shortage. World-wide recession starting in Fall 2008 completely reversed those gains, as the demand for ethanol and other biofuels collapsed even more than oil demand.
Despite the economic downturn, the OECD agricultural outlook for 2009-2018 predicts that inflation adjusted average crop prices will rebound to exceed 2008 highs.  Excellent anticipated weather in 2009 combined with the global down-turn does have the potential to keep food prices down in the short-run., 
In the 3-5 year picture, the development of more advanced genetic engineering and alternative energy will affect fertilizer companies. Monsanto has already developed SmartStax (tm) seeds which require 70% less pesticide and increase whole-farm yields by a substantial 5-10%.
Fertilizer production has significantly outpaced the Federal Reserves material production benchmark since 1998.
Notice that agricultural chemicals (like Monsanto's Round-Up) have seen production decreases, dipping below the material index in 2008. This is because the international patent on Round-Up (Monsanto's phosphate based pesticide) expired, spurring cheap international production and decreasing the incentive to produce the product domestically.
Despite a generally declining US economy over the last decade, fertilizer companies generated massive excess returns. The following graph shows that the average fertilizer company outperformed the S&P 500 by over 750% over a 10 year period.
To put these numbers in perspective, that means the average fertilizer company has been growing 22.4% each year, giving them similar growth rates to celebrated tech stocks, Google (GOOG) and Apple (AAPL).
The three types of fertilizer are commonly called N, P, and K, which are the element symbols for Nitrogen, Phosphorus and Potassium. Large fertilizer companies tend to focus on one or two types of fertilizer due to Economies of scale.
Nitrogen fertilizers (N) include ammonia, urea, ammonium nitrate, ammonium sulfate, and nitrogen solutions. Nitrogen fertilizers are made by processing natural gas with heated chemicals, and therefore have prices that tend to move with natural gas. N-fertilizers are used to improve plants' ability to turn sunlight into nutrients. China, India, the USA, Russia and Canada are the world's top 5 nitrogen producers. 
Phosphorus fertilizers (P) include triple superphosphate and monammonium phosphate (phosphate + ammonia). Phosphorus is mined from volcanic and oceanic rock deposits. It is mixed with sulfuric acid to make fertilizer. The US, China, India, Russia and Brazil have the largest phosphorus deposits. 
Potassium fertilizers (K) are simply called "Potash", which is the accepted slang for Potassium Oxide. Potash needs to be mined from ore deposits, which are most common in Canada, Russia, Belarus, Germany and the United States.
Industrialization gives people a taste for meat, which requires 12-16 times the agricultural output per calorie than grain.  For example, the average Chinese citizen now eats twice as much meat as he/she did in 1990. Net imports of vegetable oil, meat, sugar and wheat in developing nations are up 1300% over the last 40 years, and are expected to grow 345% by 2030. The FAO reports that people are generally eating more in the developing world, where daily calorie consumption is expected to rise 10-20% per-capita by 2015. 
As emerging markets build infrastructure and factories, they will eat more and drive up the price of oil. This will make biofuels a relatively more attractive energy source. The USDA estimates that 1 gallon of ethanol requires 20+ pounds of corn so it is easy to see how fertilizer companies will benefit from enhanced biofuel production. 
Biofuels section Ethanol in the U.S. is produced from corn, one of the most fertilizer and nitrogen intensive crops. From 2007-2008, corn prices jumped 125% due to heightened demand for biofuels, food, and livestock feed.
The demand for Ethanol and biofuels peaked in 2008 along with gas prices, only to falter in 2009. People only consume biofuels, it seems, when gas prices are extremely high. For instance, the Midwest has seen a 52% drop in ethanol consumption, with only a 3% drop in gasoline consumption. Ethanol is about 15-20% less efficient than gasoline, and studies have shown it needs to be about 40 cents cheaper per gallon to compete. 
There is also evidence that ethanol is extremely fuel inefficient, requiring 70% more energy to produce than it actually yields. Soy-based fuel is somewhat more promising Soy biodiesel is significantly more powerful than ethanol, yielding 120,000 BTUs per gallon versus 80,000 BTUs.   Bunge (BG)
New research done at UC Merced and published in the journal Science in May 2009 presents evidence that crops yield 81% more energy per unit area of land when it is burned to make electricity to power cars than when it is refined into ethanol. Furthermore, greenhouse gas emissions from this "bioelectricity" are 100% lower per unit area of land than cellulosic ethanol.