The salt on the rim of a margarita glass enhances the sweet and sour flavors of the drink. It also serves as a nice contrast to the tartness of the lime and tequila.