He wrote the song after watching his best friends get married.