Depends - actual chocolate? I like near the end of the boil - any longer and you lose delicate flavor compounds, but too short and it doesn't melt/dissolve. Most people like high quality cocoa powder.
If it's an extract, you could do late boil, but probably better to add after primary fermentation is complete or even when bottling. Never used extract though, so can't comment from experience.