Don't listen to the available-light-only snobs like Paul C. Perkins, (who needs to tell us all he's an MD...) Although the M's flash sync is a little slow for some applications, it's very useful for fill flash in all but very bright light. Used correctly, flash can open many possibilities and add lots of creativity to your photography with any camera.
As other posters have written, to use a flash with your (I'm assuming unmodified) M2, you'll need a sync plug adapter and some sort of cord that fits to your flash. If you are lucky, you might find an old dedicated Leica M sync cord, and do away with the extra piece. I found one on ebay a while back which has the Leica M3/2 plug on one end, and a household male plug on the other end. I got it for next to nothing, and it works great with small flashes mounted to a hotshoe to female household adapter. If you can find a dedicated cord and do away with the M/PC adapter, so much the better; the old M2/3 style sync is a very solid, positive connection- it's actually much better than the PC, if less convenient for being non-standard. The best option- though a little expensive- might be to have Paramount make you a cord. Go to
www.paramountcords.com, and check out the custom cords options. They offer the Leica M3 (same as M2) plug as an option for one end. You can get whatever type of adapter for the other end you could want- as well as a whole range of lengths in straight or coiled cords to go in between. I have a couple of these. I find the M to female hotshoe, with a 3 foot coiled cord to be very useful; the coil pulls the cord pretty short so it's not in my way when mounted on the camera or a small straight bracket, and when I want to use the flash farther off camera, it stretches out to about the full length of my arm. Cost is $77, but they are very well made cords, and I've found them to be worth the cost.
Anyway, with some sort of adapter/cord combo, flash on the M2 is a breeze. If you have enough cord and use a small bracket, or just hold the flash in your hand, you can really get creative with where you place your supplemental light. Of course I love my Leicas as available light cameras- but sometimes you want or need more light, either just to get good exposure, or to add creative control to an image. Don't be afraid of flash- it can be a very useful tool, and one that all photographers should know how to use. Good luck, and have fun!