I think around 14 months or so.
I have also struggled with this as we are a strictly no caffeine family (well us girls anyway). There is only a small amount in chocolate however. I would not ever let them eat any mainstream candy, as it all contains GMO components, and a lot of it has dairy and soy. We eat Enjoy Life (an allergy free brand so no dairy)Chocolate Chips in peanut butter cookies, or on a spoonful of peanut butter.
We have been chocolate free for 2 weeks because I was thinking the caffeine was affecting my sleep pattern. I also thought it was causing dd1 to be more annoying than usual. I did not make any conclusive findings. I still had periods where I slept for 10 hours and then a day or two where I couldn't sleep... so I can't attribute insomnia to chocolate in my case. dd1 had a few days where she was improved (the first three days), but then she was back to back talking, pacing, talking incessantly, etc.... I am now thinking it is just sugar (fruit sugar and raw unrefined sugar, we don't eat white sugar or processed food) in general that affects her.
I am patently against caffeine on any level. However the reality of living without chocolate was just not doable for me at this time. If I am going to eat it, I allow my children to have it, but only the Enjoy Life allergy free kind, and I only let them have some, like maybe 1 1/2 tbsp in a day at the most. I have gotten over most of my vices, but this one is still with me for now. If there was caffeine free chocolate, I would buy it instead to be sure I was not ingesting anything speedy. But like I said, from my own experiment there didn't seem to be any difference for us.
I also recently read that chocolate is harvested by child labor in poor conditions. I am investigating where Enjoy Life gets theirs from, since I try very hard to support the types of systems that do not use child labor in a cruel way.