A quality flashlight, designed for use with a firearm is an absolute necessity. Before you can whip out your latest whiz bang death ray machine and annihilate something, you must first identify it. As has been shown repeatedly most shootings occur in low light conditions meaning you'll need to illuminate the potential threat first. This application, like any other special application, calls for a special tool and that tool is a flashlight designed to be used with a firearm. As far as I'm concerned only one company makes flashlights that are actually meant to be used with firearms. This company is Laser Products, maker of the SureFire brand of flashlights.
There are other flashlights that can be used in a pinch, and I have used them, but there is no substitute for a SureFire. In order for a flashlight to be acceptable, it must be bright and its switch must be designed for tactical use. Brightness is pretty self-explanatory and means that the flashlight will use lithium batteries or some type of special recharging system. The traits of the switching system are actually quite simple, the natural state of the flashlight must be "off." This means that the flashlight will automatically stop producing light if it is dropped or if you shift your grip on it. Additionally, the switch must be located properly on the flashlight - on the tailcap.
Before continuing, just a quick note on my ratings of flashlights. I carry a lithium powered light on my duty belt primarily to be used with my handgun and secondarily as a backup to the rechargeable in my patrol vehicle. I'll also typically carry this same flashlight off-duty "just in case." My ratings are based more on this dual role.