I was recently thinking about the act of giving speeches. I have given some wedding speeches, including a best man speech for my brother's wedding, and have been told I give good ones. Here are some guidelines.
Do not drink much before your speech. 2 drinks maximum before you give your speech.
You may compliment the bride's half of the wedding party for how they look, and thank the hard work of everyone involved if that feels appropriate. You may raise a drink to the brides' party if you want.
Timing is important. You probably have a lot of things to say, but try to keep it to 3 minutes. I know that this sounds very brief, but it is an appropriate amount of time for a speech. If you must go longer, then absolutely no more than 5 minutes.
About half of your speech will be about the groom. It is meant to make him feel good. Make it something that makes him feel good; even if you have a family / friend dynamic of "busting each other's balls" (my family certainly does) avoid the temptation to do publicly in a speech.
Humour is good, but it isn't necessary. If you are going to be funny, do not be funny at the groom's expense. This is a day to celebrate him; tell funny stories that build him up. No jokes about being drunk and doing stupid things. At my brother's wedding, I talked about our friendship, despite being 10 years difference in age, and how proud I was of him.
Talk at least briefly about love in general, and the relationship of the bride and groom specifically. It is the reason that everyone is gathered. It can be saccharine. It probably should be at least somewhat saccharine. This bit from Wedding Crashers is actually beautiful: "They say true love is the soul's recognition of it's counterpoint in another." That's the sort of thing that works at a wedding.
Talk briefly about the bride Ideally, you will say something like "You've been a part of our family for a while, but I'm so excited to have you for a sister-in-law." Keep it brief, and keep it truthful. I told a story about the first time I met the bride, which was even before they started dating, and how that day I knew they were going to get together.
End your speech with something simple and to the point: "I'm very happy for you both, and I love you." And you can raise a glass to the couple at this point.
This bears repeating: keep it brief.
Practice the speech. If you have a partner, or a roommate, or can gather with people wherever you are, then practice it with them. Ask for feedback. Do not make brief notes and then wing it.
Make sure that the speech is appropriate for the guests of the wedding; if your grandmother is there, or if kids are there, the speech should be appropriate for all of them.
You may want to have a theme that ties everything together (ie - the things you talk about regarding the bride, the groom, or any other stories have something tying them together) but I don't think that's actually necessary.