On one hand, the cocoa in chocolate has many health benefits, such as being rich in antioxidants and stimulates positive mood hormones such as endorphins and oxytocin. These benefits are increased with the higher cocoa content found in dark chocolates.

On the other hand, many preparations of chocolate are high in refined sugars, which can affect diabetics, and long-term overconsumption of sugars may lead to diabetes.  Milk chocolates tend to use more sugars than dark chocolate, though it can vary widely, so consult the packaging of individual products for exact sugar content. 

Dark chocolates are not necessarily safer at this time, however.  Soil contamination in cocoa farms has caused many sources of cocoa to contain high levels of heavy metals, such as lead and cadmium, sometimes very high.  Dark chocolate can have much higher concentrations than milk chocolate, due to the higher proportions of cocoa used to make dark chocolate.  However, the concentration of various heavy metals in any individual product, a particular dark chocolate candy bar, for example, will vary widely based on the farm the cocoa was sourced from, whether it was mixed from various sources, and the processing methods.  Unfortunately, most of this information is not yet required to be on chocolate food labeling, despite the only accepted "safe" level for lead consumption is zero.  
Additionally, chocolate and cocoa contain moderate to high amounts of oxalate, which may increase the risk of kidney stones in some people. 

Chocolate also contains caffeine, though much less than coffee (it would take 100-400g of dark chocolate to equal one 200ml cup of coffee in caffeine content).  While caffeine may have some benefits under certain circumstances, consuming large amounts of chocolate before bed could lead to sleep disruption.

Of course, this is all nutritional information for humans.  ***Please remember that chocolate and cocoa is poisonous to dogs, cats, and some other animals.  Please consult a veterinarian if you suspect an animal may have ingested or had access to chocolate.***

I hope that helps explain why is chocolate sometimes deemed unhealthy.  

Is there anything else I can do to assist?
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence