I probably should weight in on this issue, being it's right up my alley and all.
Flashlights, just like any gadget, gizmo, or firearm for self-defense have their pros and their cons. However, it's more about the user of those devices... their understanding, handling, expectations, maturity, and training.
Can a gadget (such as a flashlight in this case) be a helpful tool to mitigate a violent encounter? Yes. Is it more likely that an ill-prepared / ill-equipped / ill-conceived person will wield and put false security in a flashlight (or other device they may carry) in their ability to help them? Absolutely.
Understand what the device can do for you, realistically. Remember that it is just a tool, and you shouldn't over-rely on it, or be over-eager to use it. Be able to go hand-to-hand if need be. But above all that, exercise awareness and avoidance abilities to circumvent trouble if possible.
Also try to understand how employing a device can worsen the situation. It could malfunction, be taken away from you, insight an escalation of violence, draw your attention away from other, more simple and effective methods to escape / survive. There are many other I could list.
If you fully understand the pros and cons. If you have backup training on what to do without the gadget. If you use the device with maturity, and have realistic expectation of what it can and can't do. If you exercise the many other things that make you a tough target, to circumvent / defuse a violent scenario ahead of time... then yes, a flashlight (or anything else) can be a good self-defense tool. Oh yeah, and you need to practice with the device... a lot!
I carry a Dereelight CL1H V4 R2 in my left pocket all the time. I find it to be useful at night to survey my surroundings. I've actually used it to stop some juveniles from approaching me after I told them to stop their advance. It really did stop them in their tracks, but then again, they weren't that committed to doing me harm I suppose. It's just one more layer in my self-defense portfolio. So long as I keep it in that context, it's a benefit to me.
I've actually done a podcast or two on this very subject... although I can't recall the episode numbers off the top of my head.
Anyone interested in this kind of stuff may want to check it out with the link in my sig line.