Both are originally from Mexico and Central America and were unknown to Europeans before the conquest of the new world. Hernán Cortés introduced vanilla and chocolate to Europe in the 1520s.

Vanilla, called "tlilxochitl," by the Aztecs, is a cultivated orchid vine. The pod, which is the source of vanilla, was called "vainilla" (little pod) by the Spanish. Cacao-the main ingredient of chocolate-comes from seeds of the "Theobroma cacao" tree (Food of the Gods), and has been cultivated for at least three millennia in Mesoamerica (Mexico and Guatemala), with evidence dating back to 1900 BCE. Chocolate was traditionally prepared as a drink. Aztecs made it into a beverage known as "xocolātl," meaning "bitter water," due to the intensely bitter taste of the raw seeds. The Aztecs drank their chocolate cold, seasoning it with a variety of additives, including chile, allspice, vanilla and honey. The Mayans liked their chocolate warm.

Both are labor intensive crops, and involved slave labor initially. Initial attempts to cultivate vanilla outside Mexico and Central America proved futile because of the symbiotic relationship between the vanilla orchid and its natural pollinator, a bee. Pollination is required to set the vanilla fruit. Hand-pollination, discovered by a 12 year old slave on Reunion Island in 1841, allowed global cultivation of the plant. Madagascar now accounts for most of the global production of vanilla & Western Africa produces most of the world's cocoa.

More Info: en.wikipedia.org