Most hydrangea types -- pink, blue, or white mopheads and lacecaps, or oakleaf forms -- bloom on old wood. Prune these types of hydrangeas before midsummer. If you prune them in winter or early spring, you'll be removing flower buds.
With newer reblooming types, such as the Endless Summer Series or Let's Dance Series, which bloom on new growth as well as old wood, timing of pruning is less critical. Even if you cut off some of the flower buds by pruning the old stems, the plant will bloom on the new growth.
White-flowered paniculata (such as the varieties 'PeeGee' and 'Limelight') and arborescens (including 'Annabelle') types flower on new wood, so they can be pruned any time other than just before they bloom.