That said, from personal experience (as someone who lost 60 lbs by making changes to my diet) chocolate does have beneficial effect on weight loss, in that at a very least consuming smaller amounts of chocolate (in terms of calories) satisfies craving for sweets better than consuming much larger (in terms of calories) amount of other sweet foods (such as pastries). Just this benefit alone is sufficient to recommend (prudent) use of chocolate in a calorie-controlled diet.
I lost 30lbs in 3 months in college once I was done playing football, and there were 2 main tricks that I used: I didn't keep lots of food in the apartment, and I changed how much I ate. I didn't cut anything out, just reduced portions (slight reductions for some, drastic reductions for others). If you cut something out completely like sweets, you will crave them and eventually break your diet and binge. Instead, keep a pack of fun-sized bars (well, for me it was whatever the seasonal-shaped Reese's was) and if you really need a snack or are craving chocolate eat one. The key to a successful diet, just like everything else in life, is moderation and a little self-control.