The opening of your story should promise what you want to promise. And that is going to depend a whole lot on what the story IS.
A comedy, for example, might (or might not... depending) use a deceptively bright opening-- the sunny beach with nice sunbathers everywhere-- to set up a comically disastrous afternoon; that is, relying on surprise to startle laughter out of the readers. Paradoxically, a tragedy might start with a happy scene, again to set up the contrast between what is to come.
It all depends. :) But you are dealing with reader expectation, and you should think about what that is and how you'll use it. Snicket is dealing with a child reader's expectation that stories usually have happy endings. That exists BEFORE the child picks up the book, so Snicket plays with it.
Another author, however, might know that children expect that happy ending, and go in the opposite direction, using that expectation to lull the reader into a state of relaxation. I've always found the opening of Little Women paradoxically terrifying (in retrospect), because it shows the Ordinary World of the four girls to be, despite their poverty, a place of family love and security. I remember very clearly how unprepared I was for what happened later in the book (you know—I still can't deal with it openly— B d-ing). Of course, now I see that I was being set up for the most painful of crashes because that first scene makes the promise, "If you have love, you will be happy." Ha! As if! Those sisters loved each other and their mother and father and see what that horrible cruel author did to them! (You can tell, I'm not yet over this. :)
Most of the time, however, there's a silent conspiracy between author and reader. The opening events promise a sort of book, and that's what the reader gets. However, as I said, it's a silent conspiracy. It's not as obvious as Snicket's opening paragraph. You generally aren't going to get a first scene that says, "This is a thriller. That means you can expect chills and thrills, and also don't be surprised if I reveal the identity of the villain very early, and don't waste a lot of brain cells trying to find the REAL villain, because he IS the real villain, you dolt. This is a thriller—an emotional experience—not a mystery—an intellectual experience. So settle down, turn off the higher brain, and prepare to be scared, okay?"
No, the author doesn't say it outfront like that; rather the first scene usually prepares the reader for this type of book, and the reader knows what to expect and so isn't disappointed when that's what happens in the book.
Let's take an example. Now I should make clear that the same basic plot can be done in different ways to produce different genres or types of stories. A murder can be the initiating event in the external plot for almost any type of story, not just a mystery or thriller. I just had someone email me and ask if a murder can be the start of a relationship story, where a mother and daughter reconcile. Sure. A murder can be a central or initiating event in a relationship story, a romance, a romantic suspense, a horror story, a comedy, a thriller, a suspense novel (which is different from a romantic suspense), a mystery, a legal thriller, a medical thriller, a family saga, a s/f novel, a psychological drama… really almost anything. Murder is the sort of big culturally significant event that will always get our attention.
But… each type of book is likely to have an opening consonant with its purpose (to horrify, thrill, bring a couple together, explore psychology, etc.). You know as a reader what an opening means. Haven't you ever been in a certain mood and wanted a certain type of book? I was recently undergoing a stressful time—just too much work, the usual—and I didn't want to read anything agitating, so I wouldn't get past page 10 in a book that opened like a thriller would. I still love murder mysteries, however, no matter what mood I'm in, so I wasn't about to dispense with the whole dead body thing. But I found myself reading—somewhat compulsively—the Brother Cadfael mysteries (which are beautifully written and realized, and I highly recommend). These start out, almost always, with a scene of order or routine or camaraderie in the Ordinary World (Cadfael's monastery). Then—and only then—the order would be disrupted by a death, but never of anyone we really cared about (not like that evil Little Women, grumble). And then Cadfael would out the murderer and order would be restored.
My point is… I could read the first scene and know what I was going to get, and if I were in the right mood for this type of book, I'd continue reading. Because I am, of course, a savvy, sophisticated reader, I can sense from the emphasis of the first scene what the book was going to be, and so I'm primed to get what I expect. This is kind of like the publisher putting the genre or sub-genre on the spine of the book, or the bookseller shelving it in a certain area. If you are in the "horror" section of the bookstore, well, you expect horror in those books, right?
But… something I've noticed in submissions is how often that opening scene is a mismatch with what the story is supposed to be. I edit erotic romance, and while I certainly don't expect explicit sex in that first chapter, I do expect a heightened presentation of the sensual realm in some way. I also expect, even if the romantic couple don't meet early, that there is the opportunity for or intimation of romance-to-come, and that might be as simple as the heroine being presented as "alone" in the first scene. (Just as with the Snicket excerpt above, the "aloneness" suggests its negation—the Baudelaire children presumably have been separated from their parents, and the solitary heroine is ready, if not willing, to be joined by someone else.) A submission that starts with, say, a young couple proudly showing off their new home, or an army grimly vanquishing the enemy, doesn't "feel" like romance to me, and it's not going to "feel" like a romance to my house's customers.
Okay, so let's get some examples. Let's start with an easily adaptable plot. Sarah, a young woman, goes to the funeral home to deal with the necessities of burying her Uncle Wally. She realizes somehow he was actually murdered, though everyone has assumed the cause of death was natural or an accident.
Now, assume that this really is adaptable and we can add or change to this basic plot. (Like maybe in the end she's going to solve the murder, or maybe she's going to marry the cop who helps her solve the murder, or maybe she's going to get murdered herself—whatever you want.) BUT… you have decided that this is going to be a certain genre or type of book. What I'm suggesting is that even given a similar set of plot events, different genres will produce different openings.
So let's look at a few possibilities, then maybe get more subtle.
Maybe you're an avid reader of Miss Marple novels and you want this to be a cozy mystery. What would you start with? I'd say… first, Sarah can't have been that close to Uncle Wally, because cozy mysteries are cozy precisely because there's not a lot of horror and sorrow associated with the death, hence the victim is usually not important emotionally to the sleuth. So… if we want it to be clearly a cozy, we might start with a scene that emphasizes Sarah's distance from the victim. She could get a call from a hospital saying that her Uncle Wally has her listed as next of kin, and she needs to come deal with his body, and she could say, "Who is Uncle Wally?" and only later figure out that he's her late father's longlost brother. Or if you wanted to start closer to the mystery (the discovery that he was in fact murdered), you could have her arriving at the funeral home and explaining to the director that no, she doesn't have a photo of him for the funeral program because she only just found out he existed. See how that sets up the "coziness"—which emphasizes the intellectual aspect of the mystery by showing the distance between the sleuth and victim, but also establishes a psychological need on the sleuth's part to solve this (because she's "next of kin").
Now imagine another author-scenario -- you're up for tenure at a university and your stuffy colleagues will be most impressed with a literary psychological novel (which just happens to have a murder in it… hey, it worked for Umberto Eco!). How would you start this book in a "literary/psychological" way that will make your tenure committee think you haven't been dilettantishly reading Agatha Christie novels in your library carrel? What sort of opening will promise a literary or psychological read?
Some other opportunities: Maybe you really are interested in exploring possibilities of, I don't know, how societies in the future will deal with dead bodies (so the funeral home is actually going to shoot the coffin off the space ship into space). What would you do in that first scene to present this as a science fiction novel that just happens to have a murder in it?
What about the subtle gradations of the other standard "crime novel" sub-genres? How would this plot be started in a thriller novel?
In a legal thriller?
In a medical thriller?
In a suspense novel?
In a romantic suspense novel?
In a private-eye novel?
In a police procedural?
In a mystery (not cozy) novel?
And let's transport this to other genres:
How would you start this in a science fiction novel?
In a romance novel?
In an erotica novel?
In a horror novel?
In a western?
In a comedy?