Why do men wear buttonholes at weddings?

Why do men wear buttonholes at weddings?