Chocolate is a sweetened confectionery available in both the muggle and wizard worlds. In the case of the latter, it also has special properties, depending on the brand. read more
In the third book, Remus lupin gave harry some chocolates after his first dementor attack. So chocolates are given to the victim of the attack to help them feel better. read more
I don't think the book ever explains why but chocolate does contain a number of mood altering drugs such as tryptophan, phenylethylamine and anadamide which some people say can make you feel like you're in love. That feeling might help to replace all the good feelings that the dementors suck out of you. read more