According to etiquette, one extends best wishes to the bride and congratulations to the groom. I'm not sure if you are asking about what you would write in a note, or what you would say if you spoke to the person. In person, or in writing you might say, "I heard that you and X were married recently.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.