Sunspots have long been suspected of being related to the weather. The Maunder Minimum from 1645 to 1715 was a period with no sunspots usually called the Little Ice Age, because it was most famous for being a cold time. And weather is related to how well crops grow. So it is natural to expect there could be a link between sunspots and agricultural output. Sunspots appear in cycles, with more happening every 11 years, except during the Maunder Minimum.
Some people try to predict a big crop output by the sunspot cycle. Sites like The Market Oracle and PRWeb are warning that the current cycle of sunspots, solar cycle 24, seems to be less active than recent cycles, so they would expect cooling and bad crop yields. The Old Farmer's Almanac web site is still undecided about how intense the next solar cycle will be, but does note that solar activity has picked up in 2011 and 2012. The Trader says “there remains a discernible underlying association between food prices and the solar cycle”; there are some alignment and some peaks in one that don't correspond to peaks in the other, you will have to look at the graph here to see if you discern a link.
A study published in April 1976, Do Sunspot Cycles Affect Crop Yields? by Virden L. Harrison, showed a possible link between sunspots and agricultural production. The study covered wheat in Texas and Kansas, corn in Illinois and Nebraska, rice in Louisiana and cotton in Texas. Sometimes crop production was better when there were more sunspots, and it sometimes dropped when there were fewer sunspots. Cotton in Texas and wheat in Kansas showed no link. Nebraska corn yields were variable and did not show a link to the single sunspot cycle, only the double cycle of 22 years. The double cycle refers to the sun's magnetic field reversing polarity during each 11 year cycle, making a period of about 22 years for a complete cycle. The study cited others that said some of the variations in crop yield may be due to solar activity causing droughts, and so may not impact rice as much as the other crops.
Doing a quick update by looking at the agricultural production data on index mundi and comparing it to sunspot data from NASA and more detailed graphs from the Australian government Bureau of Meteorology reveals some apparent links, but also contradictory data. US wheat production is erratic, but does show peaks in 1981, 1990 and 1998, years of high solar activity. Then a valley in 2002, near the end of the sun's last period of high activity. Then another peak in 2008, which was known as an eerily quiet solar year, because sunspots were a bit slow reappearing to start the next cycle. US cotton production has fallen since it peaked in 2005, near the start of the most recent low period of solar activity.
The US shows steep drops in corn production in 1983 and 1988. 1983 is a year when solar activity was declining; in 1988 it was just starting to increase after a low point. Checking data from other countries finds more contradictions. China shows a very smooth curve of increasing corn production, with a slight peak in 1994, and wheat production shows a peak in 1997, which was in a low period of solar activity. The biggest wheat producer listed on index mundi is “EU-27,” which has a short track record. Data only goe back to 1999 and are fairly flat, with slight peaks in 2004 and 2008. China's cotton production had its first major peak in 1984, and another in 2007 and 2008, all years of low solar activity.