Depends on if you are a man or woman. Usually for the man it's easy since you just need a nice tux (I'm not talking about something that's going to stand-out - like pink or baby blue tuxedos would stand out - but something like a black tux). It's a little harder for women. I've always just worn a nice dress or blouse and skirt that isn't really dressy. Themes of the wedding can also play a role.
I would wear a nice dress. If it is indoors I would wear stockings and heels as well. A man should wear a suit or at least nice kakis n a button down shirt n tie. I base this answer on my experience n going to weddings as well as what guest wore to the Royal wedding. It doesn't get more formal than that, right? Good luck!
It is amazing how many people confuse formal with semi-formal or what today is considered "dressy". Evening Formal consists of a tux for men and fancy dresses for women either floor or ankle length. Day Formal consists of cut-away for men and fancy dresses for women either ankle or cocktail length. Semi-Formal consists of suit or Sports Coat and tie for the men and cocktail dresses for the women. "Dressy" by today's standards means what is also called resort casual - Sports Coat (optional) or nice shirt and pants for the men, and less fancy dresses for the women. Unless the wedding invitation states any of the above as requirements, you don't dress to match the wedding party, you just wear appropriate attire.