James Moran (Severence, Doctor Who, Primeval, Torchwood) says:
I always treat it as "what *kind* of horror/scifi/chicken-snuff story is it" - for example, Firefly and Battlestar Galactica are both TV science fiction shows. But Firely is a fun, action-adventure show with plenty of laughs and witty banter amongst the dangerous situations, whereas BSG is a dark, gritty, serious show with parallels to the recent war in Iraq. Basically, is it a funny show or a serious show. Or both. Or whatever. I usually put a line or two in near the start to make it clear what sort of thing it is, and usually mention a couple of shows that, while they may have different setups and live in different genres, will have a similar tone or feel to this one. Innit.
And Ben Teasdale (Coming Up, Spine Chillers, Twisted Tales) says:
Isn't it also somehow a kind of CONTRACT between the writer and the audience? You set up in the first few scenes the kinds of flavours and emotional notes you're going to be playing with - like the emotional DNA of the piece - and then the audience know "where they are" with it. It's like setting out your stall - people know what they're signing up for.
And then, while people want and expect to be "surprised" in terms of the actual Things What Happen, they DON'T, as a rule, want to be surprised by a sudden change of "tone". It's like changing the RULES of the thing - the emotional equivalent of gravity suddenly working in the wrong direction, or people whipping out blaster guns in the middle of a historical scene. If you've set that up as part of the "rules" up top, people are fine with it - but not if it's late enough to cause a disjunct.
For me the prime exemplar of how to lay down tone swiftly and elegantly is the pre-credits tease of the first ep of Buffy The Vampire Slayer. Boy and girl break into school at night - some sexual goofing around - he's pretending to scare her, it's funny but with an edge that there MIGHT be menace lurking there somewhere - then boom, switcheroo, she bares her fangs and it turns out she's the vamp and kills him. Pretty much all the flavours of the next seven seasons of it are right there in those first few minutes, so we trust it whenever it cleaves to them, and when it doesn't - it requires work to win our trust again (cf. the Spike/Buffy rape stuff).
You CAN do jolting things with tone, but it tends to put you in the territory of arthouse stuff - eg. the end of There Will Be Blood, where it all comes down to *SPOILER ALERT* a guy smacking another guy's head in with a bowling ball. For me that's a gear shift - like going from 2001: A Space Odyssey to A Clockwork Orange - but it kind of works because it's a self-consciously arty film, and the THEME (violence and power) holds it together.