Chocolate is a food item which provides a small amount of nutrition, filling a colonist's hunger meter by 10% per unit consumed. Unlike most other foods, it also grants a bonus to Recreation of 10% per unit.
Chocolate can be acquired by planting cocoa trees after Cocoa is researched. The trees have a base Harvest Yield of 20 chocolate per harvest every 16 days, modified by the Plant Harvest Yield of the grower. Harvesting consumes the trees and they must be resown every harvest. Unlike in reality, no further processing is needed to create chocolate.
Chocolate does not spoil, it only deteriorates with exposure to the elements, and provides roughly 10% recreation of the Gluttonous type per consumption, so its also a good emergency option to break out when times are tough and mood is at risk due to lack of recreation time, however its low nutritional value makes it a poor choice for actual sustenance. It is especially good for caravans as they can't get recreation while moving otherwise, and only slowly get Social type recreation when stopped.
In this role is is comparable to insect jelly which provides 8% Gluttonous recreation and 0.05 nutrition but carries a 2% risk of food poisoning. Statistically, chocolate is superior in terms of nutrition and recreation provided and the lack of food poisoning risk is especially helpful, however Insect Jelly requires no research to acquire and is often acquired in large amounts from threats that would arise regardless. Chocolate must be researched and farmed. Additionally, insect jelly is also 1/3 the weight of chocolate and sells for more, giving it advantages as a buffer product in caravans as it occupies less weight for trade goods and is worth more in the event that it must be sold to make up the value in a trade. Chocolate can be produced at will, on maps without mountains, and without fighting an infestation. Which is preferable will depend on the circumstances of each individual colony, as well as player preference.
Chocolate is also a decent trade good, separate to its use by the caravan itself, as it is moderately valuable, light and it is easy to get a lot of it when facing late game infestations, or can even be farmed.
Colonists will eat no more than 4 units of chocolate at a time. Manually directing troubled colonists to eat it when necessary is advised.
In Beta 18 or earlier, chocolate could not be produced by your colonists, and was exclusively a trade good.