Typically a cocktail dress or dressy pantsuit is appropriate attire for a woman attending an afternoon wedding. A dark suit and tie is typically appropriate dress for a man.
The formality level of an afternoon wedding dictates appropriate attire. If the wedding is formal, the invitation should say so, and in that case a cocktail dress or dark suit is right. If the invitation says the wedding is casual, a woman can wear a sundress or dressy pants and a top, and a man can wear a sports jacket or blazer over a collared shirt and dress pants. A guest who is uncertain about expected dress should contact the couple or a close family member for guidance.