First of all, marriage in Minecraft is not the same as real world marriage although there are similarities. Reasons for marriage in Minecraft is primarily companionship and as well as the in game benefits, is really two players consenting to share everything in the game for the period in which they are married.
How it works .
Any two players can be married, all it requires is a player with priest privileges to issue the marry command and for both players to consent. To end a marriage likewise will also require a player with priest privileges to issue the divorce command. All players with rank of dignitary or higher have priest privileges and can marry any two players within a 25 block radius. Some player might do it freely, others may wish to setup a registry office and charge for the service. This will be up to the players themselves to arrange.
The marriage commands are as follows:
/marry [playername] [otherplayername]
/marry divorce [playername] [otherplayername]
In addition, any player ranked warrior will be entitled to self marry with another player without the need for a priest.