Just a polite/friendly smile and a firm, "Nah, I'm right thanks."
Or I just say, "Nah, I don't really feel like it just now / I'm not really in the mood. But thanks!" Smiling always works.
If it's something really good, you could try the old "But they're your chocolates/timtams/lollies! I'd feel so bad about taking one!"
Or could be trying to win a bet. My friend went into a competition with our English teacher to see who could go without chocolate the longest, and she just explained that whenever she was offered it.
Or beyond allergic, just tell them (and yourself!) that you don't actually like that thing. People have weird tastes - I have friends who won't touch chocolate, chips, ice cream, cake, just because they don't like the taste!!!
Alcohol wise, say you've gotta drive, or that you just wanna stay sober tonight. It's really easy for P platers now, cos the limit is 0.0, so even if you only have one drink the night before, you can't be 100% certain that you'll be under the limit the next day. Or even if you are certain, just claim you're not!!!
I had / am going to have a really big lunch/dinner/breakfast/brunch/afternoon tea.
And when it's getting really tough, and all my friends are loudly proclaiming the wonders of the offered food, I try and get outta there for a minute. Toilet, or fresh air, or "I've just realised I forgot...".