Balancing humour and sincerity
Start your speech by telling everybody to be quiet (SEE EXAMPLES), then announce who you are, why you're bothering them and what you intend to talk about in your speech (SEE EXAMPLES). If you need extra support, make some self-deprecating quip about being nervous (SEE EXAMPLES).
It's not all about you, though, so move swiftly on to the happy couple (SEE EXAMPLES). Exploit their popularity to get the crowd on side by asking everyone to raise their glasses or to give the newlyweds a round of applause (SEE EXAMPLES). You could also draw attention to the parents of the bride and groom (SEE EXAMPLES) which will hopefully make you popular with some of the guests who don't really know who you are. It also wouldn't be a bad idea to compliment some of the other players in the day's formalities, or even gush about everyone in the room (SEE EXAMPLES).
Describe the special moment you were first asked to be best man (SEE EXAMPLES); reveal why the groom said he wanted you as his best man, and why you think he REALLY asked you to take on the job (SEE EXAMPLES). Pull out an anecdote - which in no way needs to be true - about the groom's past, to show how well you know him, but try to keep it clean (SEE EXAMPLES)! You could even bring out a prop or two to squeeze a little more discomfort out of the groom (SEE EXAMPLES).
After this barrage of mocking, you should make a small but heartfelt gesture towards the groom, just to reassure the assembled masses that you really are the very best of buddies (SEE EXAMPLES).
Now, turn your attentions to the bride - in a non-sleazy way. Do not, whatever you do, throw a gibe in her direction; be sure to stick to unerringly complimentary statements (SEE EXAMPLES). If you remember how you first met her, you could mention this, stating your shock when you realised this perfect specimen of womanhood was romantically linked with your best mate (SEE EXAMPLES).
Now you have drawn attention to both the bride and the groom as individuals, talk about them as a couple; how they have worked so well together in the past (SEE EXAMPLES), how their special day has been a long time in the making (SEE EXAMPLES), how it all (or nearly all) went according to plan (SEE EXAMPLES), and how their future is set to be truly wonderful (SEE EXAMPLES).
Now it's time to wrap this speech up. Avoid the temptation to get in a final dig: simply reiterate your sentiments of love and goodwill towards the happy couple and call for a toast (SEE EXAMPLES).
Finally, sit down and let somebody else talk.