Candy-making oral tradition credits the invention of candy corn to George Renninger, a candy maker at the Wunderle Candy Company of Philadelphia, who is said to have invented it sometime during the 1880s. At that time, many candy makers were producing "butter cream" candies molded into all kinds of natural or plant-inspired shapes, including chestnuts, turnips, and clover leaves. The real innovation in candy corn was the layering of three colors. This made it taxing to produce (all those colors had to be layered by hand in those days). But the bright, layered colors also made the candy novel and visually exciting.
Jelly Belly Candy Company
In the early days, not everybody called it "candy corn." Some people called it chicken feed. Goelitz's packaging from the 1920s features a proud rooster scratching around in the candy bits and the motto "King of the Candy Corn Fields." (image) The thing is, corn wasn't something Americans ate much of before World War I. There were no sweet hybrids in those days. Corn was coarse and cheap and not very tasty: good food for pigs and chickens. It wasn't until war-time wheat shortages in 1917 that any but the poorest Americans would have considered corn flour, corn meal, or corn bread acceptable foodstuffs. Candy corn, on the other hand, quickly became one of America's favorite treats.
National Candy Corn Day, an unofficial observance with murky origins in the early 2000s, comes around on October 30, the day before Halloween. But the association between candy corn and Halloween has not always been so intimate. This Brach's ad from 1957, for example, features candy corn as one of "Brach's Summertime Candies," alongside circus peanuts, orange slices, and jelly beans. A 1951 grocery store ad celebrates candy corn as "The candy all children love to nibble on all year long." Through the first half of the 20th century, candy corn was first and foremost a variety of "penny candy," those inexpensive candies sold in bulk, primarily for children. A penny or a nickel would buy you a nice little sack in virtually any candy shop or drugstore. Today Brach's and Jelly Belly (formerly Goelitz) are the only national brands of candy corn, but throughout the 20th century many major candy companies included candy corn in their offerings.
Although the eating of candy corn was not exclusive to Halloween in the early 20th century, candy corn did have important festive associations. In addition to the corn shape, which evoked the fall harvest, the orange and yellow candy was a near-perfect match for the traditional colors of Halloween. In the early 1900s, candy corn was likely to make an appearance at Halloween parties, Thanksgiving parties, and all manner of festive autumnal occasions. Candy corn was also a popular addition to Easter baskets, which were traditionally populated with edible farm animals, and it showed up as a part of everyday life, both for eating and for playing or working. I've found references to candy corn in the 1940s, 1950s, and 1960s in such diverse sources as children's stories, math textbooks, psychology experiments, party-planning handbooks, and baking and decorating books.