Most weddings are suit occasions.
If the wedding is outdoors and the bride and groom have specified it is a casual setting, you can go with a sports coat and slacks. In almost every other situation you should wear a suit.
If you are not sure what the situation warrants, ask the bride. (She has already envisioned what the entire wedding will look like, anyway.)
When in doubt, go with the suit. It’s always better to be overdressed than undressed, and you can always take off your jacket to blend in.
Next: So what type of suit should I wear?