Wired has a rundown some of the legal issues that could be encountered by snapping a photo of someone unknowingly to them.
Basically if the subject doesn't have a "reasonable expectation of privacy"—basically meaning that it is in a public place that one could expect a camera to be at—then it is cool to take the picture. There are other gray areas that could get you in trouble also. For example taking a picture of underage persons engaging in acts of sexual expression could get you in trouble for child pornography, or snapping artwork can possibly violate copyright laws. The best rule is when in doubt, don't shoot the picture. Simple as that. Image courtesy of Wired.
Stalker or Shutterbug? [Wired]