Key, yes. Multiple songs in the same key gets boring, unless you're deliberately playing a medley.
Tempo, not necessarily. A standard set for me will have at least two attention-grabbing ones to start with, any slow ones in the middle, and then finish with some more attention-grabbing ones. Fading the tempo down to slow works nicely; conversely a quick change back up gives the audience a kick in the pants to grab any attention that drifted during the slow ones.
I say "attention-grabbing" because that doesn't necessarily just mean "fast" or "loud". Changing to an unaccompanied song is equally good at holding attention, so long as it's a fairly lively song that's guaranteed to appeal. Switching from a ballad to "The teddy bear's rave-up" or "The sick-note" is a favourite trick for me.