If the invitation says casual, then you probably can wear something like a party dress or a casual suit. Of course, stay away from jeans and t-shirt unless the couple says you can wear them for their wedding.
For a daytime wedding, the ladies can wear a pretty pastel sundress and the gentlemen can wear casual slacks and a dress shirt. Also take note of the venue; if the wedding will be held in a garden or beach, might as well do away with the high heels.
If it's an evening wedding, a short cocktail dress will be fine for the ladies. For the men, a dark suit is a good choice. Wearing a darker color, such as jewel tones or even black, is okay when attending an evening wedding.
If the invitation says black tie optional, you can expect it to be an affair to wear something formal. Ladies can wear a short formal cocktail dress or a long dress. Accessorize your look with a few jewels. For the guys, you have the option to wear a tuxedo, or if you don't have one then a dark suit and dark tie is what you should wear.
While weddings can be your chance to dress up, just remember there are still a few rules to follow. Number one on the list is of course not to steal the attention from the bride and groom. Ladies should veer away from wearing a plain white dress (though if it has a printed design, it may be okay just as long as it's not predominantly white). As said above, too casual attires like jeans and t-shirt are not appropriate things to wear for a special event.
If you're opting to wear something black, remember that wearing such color should be reserved for evening weddings. Also, some cultures sometimes do not approve of guests wearing something black for a joyous occasion, so also consider that. Better ask the bride or groom if you could don a black dress for their wedding.
Ladies should also avoid wearing something too sexy or revealing. You're not joining a beauty pageant, you are attending a wedding, a special celebration of a union of two people. Besides, wearing a dress that shows too much skin can take the spotlight away from the bride who, along with the groom, should be the center of the day's attraction.
If the invitation you received does not indicate what attire the couple prefers, the look and feel of the invitation will give you a clue on what to wear. After knowing how formal or casual the wedding will be, I hope this post gives you an idea what to wear as a guest for a wedding.