One of the hardest things you can ever do it to sit back and watch one of your close friends date a guy you don't really like that much. One of the only things out there that manages to be tougher is to have to watch that close friend marry that guy you don't like that much.
At a certain point, your opinion of the guy doesn't count all that much. Trust me. I have seen countless friends of mine date losers who treat them like dirt and yet, they keep maintaining the relationship regardless of the way they're treated.
If you're a good friend, watching this kind of thing happen is really painful. I've even brought up my concerns over boyfriends to some close friends, too. Most friends have eventually broken up with their guys and thanked me later for my honesty, but some girls never learn. If that girl who never learns happens to be one of your close friends, you might need some help with getting through the wedding.
SUPPORT YOUR FRIEND
If she claims that she is happy with the guy she is with, it is not up to you to tell her that she is wrong or right. She is the only person who can truly determine whether or not she is actually happy. Be happy that she is happy and leave it at that.
BE CIVIL WITH THE GROOM
Avoid him if you can, but be civil when you are around him. Nothing will ruin your friend's wedding more than people she cares about causing drama. Give him your congrats and move on.
LET HER KNOW YOU'RE THERE FOR HER
If you think your friend really is marrying the wrong guy, then she is definitely going to need your support down the road when trying to deal with their incompatibility. Let her know that you're there for her, always, and make time to actually be there for her, too.