Punctuation takes up only a fraction of the vertical space that letters use. So there’s usually a bunch of space either above them (in the case of . , _ &c.) or below them (in the case of ” ‘ * &c.). If you’re justifying your text, or flushing it left or right, you want a clean side. These unsightly spaces around punctuation can ruin that, though, unless you “hang them.” Hanging your punctuation makes them stick out into the margins, letting your letters create the lines they were intended for.
In InDesign, do this with “Optical Margin Alignment” under Story. In Photoshop, use the Flyout panel in the Paragraph tool.