The purpose of the rabbi at a wedding is to ensure that the extremely detailed wedding halachot, as set out by the Shulchan Aruch, are followed correctly. If not, the wedding might not be kosher.
A Jewish marriage includes: a written document (ketuba); a financial transaction (ring) in front of two kosher witnesses; and physical intimacy. 
  • The witnesses must be shomer Shabbat Jewish men.
  • The bride and groom should confirm verbally that these are the two (and the only two) witnesses that they want.  
  • The groom must confirm that he acquired and owns the ring.
  • The groom must say Harei at mekudeshet li ...  to the bride and place the ring on her (index) finger.
  • The ketuba must be kosher.
  • Before the chuppa, someone (anyone, including women) must fill in (no safrut is required for this):  the Hebrew names of the bride and groom; the date the wedding is taking place; the wedding location (city, etc.); and that a kinyan was made.
  • The ketuba must be signed by two kosher witnesses.