Why they are what they are is probably an easy answer. Mostly because it’s probably just the way that the first guy made it. By the way, the first person to make them is shrouded in mystery.
However the first confectioner is not a mystery. In the 1880s, the Wunderle Candy Company started producing the little nuggets. Then, in 1898, the almost certainly finely-moustached German immigrant Gustav Goelitz founded the Goelitz Confectionery Company and the rest is history (they still make it today and it’s almost certainly what you’re eating).
But why yellow, orange, and white? Well the obvious answer is that those are fall harvest colors and Halloween is a fall harvest holiday. Also candy corn is–as the name lets us know–corn. SO Obviously it’s a harvest candy.
In reality though, the colors were a great marketing tactic. Apparently candy before our Halloween friends came along were almost ubiquitously monochromatic and the forward-thinking candy corn brought about a revolution. It also provided most of the business to keep the Goelitz Company afloat over the years which is shocking when you consider that it’s really just weird to have in any month not ending in “-ber.”
So back to the colors. Where did they come from? Well there are avariety of theories, but perhaps the most likely goes back to our old buddy samhain. The autumn festival of the Celts focused in part on the harvest (oranges, browns, reds) and on death (black, reds, white). Pick and choose from those options and suddenly orange, yellow, and white just fit easy.
Also, they look a lot tastier than purple, brown, and black.