The other answers to this thread say not to sweat it and just write a beginning to get off the ground. I'm a heavy plotter myself, so I wouldn't be comfortable taking that advice. Instead, once I have much of a story outlined, I take the most important elements of the story and tie them into my opening scene.
A strong story has strong characters, compelling themes, a well-structured plot, and symbolism or motifs that carry throughout the story. I'm hoping that at these point, you know what many of these elements will be in your story? A strong beginning will establish all of these elements very quickly, so once you know them, you can start coming up with beginnings that specifically draw these elements out.
Ask yourself questions like these to come up with a strong opening:
- How does the scene introduce one or more of the most important characters and show the reader the heart of who they are?
- How does the scene introduce the core theme of the story? What question does it ask or miniature lesson does it encapsulate?
- How does the scene kick off the plot? Does it suggest what's coming up later in the story?
- How does the scene introduce a major symbol or motif that will be used throughout the rest of the story?
If you create a scene that has strong answers for most or all of these questions, it will launch your story very quickly and compellingly. Furthermore, when your readers finish your story, they'll think back to the beginning and be rewarded with many "aha" moments as they realize how your story all ties together.
An example of a compelling beginning is the first chapter of Terry Pratchett's Going Postal. The book starts with the main character, Moist von Lipwig, in prison, waiting to be executed. In an attempt to escape, he's been digging out one of the bricks in his cell. The day he's to be hung, he removes the brick - only to find that a new block has been recently installed behind it. As he's lead out of his cell, he's told that the prisonkeepers believe that false hope is good exercise for the prisoners. As a result, the idea of false hope is established within the first scene, and this becomes the central theme of the story. In addition, we learn that von Lipwig is a notorious criminal who always believes he can find a way out of any situation, letting us get to know the main character quickly and in a very interesting situation.
As he's lead to the gallows, von Lipwig jokes around with the guards and the executioner, all of whom are taking the situation very lightly. The juxtaposition of an execution and the lighthearted banter establishes the tone of the novel. It also establishes von Lipwig as a fast talker. Von Lipwig tries to stall for time, hoping that one of his friends will bail him out at the last second. Indeed, as he's standing on the gallows, someone he recognizes runs up to him - only to tell the executioner to get on with it. As von Lipwig realizes he's really going to die, the theme of false hope is emphasized.
To his surprise, von Lipwig wakes up in the office of Lord Vetinari, a powerful despot. The fact that von Lipwig is, in fact, alive puts a twist on the theme of false hope that has already been introduced. Vetinari uses an elaborate metaphor, calling himself an "angel" who is giving von Lipwig a second chance, to force von Lipwig into accepting a very unpleasant job. The religious language used in his metaphor becomes a recurring symbol throughout the novel. He does offer von Lipwig the chance to turn down the job - by walking out of a window in a tower to his death. This establishes Lord Vetinari's character as an affable but devious man who has no problem manipulating others. It also establishes a secondary theme of the limits of free will. The awful job von Lipwig is strong-armed into taking is to run the city's post office. This immediately raises a question in the reader's mind: What is so awful about running the post office that an all-powerful despot has no other options than to fake someone's death in order to find somebody he can get to take the job? This question gives the plot a great deal of momentum as the next several chapters answer that question and introduce more questions for the middle of the novel.
At the end of the novel, Lord Vetinari fakes another criminal's death and gives him a similar offer he can't refuse. This plays out very similarly to the scene Vetinari is introduced in. The imagery used in the beginning of the novel is echoed in the ending, giving the overall structure of the story a very satisfying parallelism.
Within three scenes, Pratchett repeatedly emphasized the primary theme of false hope and explored it from multiple sides and hinted at the secondary theme of free will. He introduced two of the most important characters, Moist von Lipwig and Lord Vetinari, and made it very clear what kinds of people they were. He set up a compelling plot that goes in a clear direction but still leaves the reader with enough questions to be interested in what happens next. He established religious symbolism that carries through the rest of the book as a shorthand for the theme of what happens when foolish hope is realized. And he was able to end the book with a very similar scene to the opening, giving the book a structure that ties itself up neatly.
And he did all of this by being very conscious of what the most important elements of his story were and deliberately incorporating them into his novel's beginning.
If you do take the other answer's advice and write a beginning more for the sake of getting started than knocking it out of the ballpark right away, my advice is still important. When you edit your story for the first few rewrites, you're likely going to be focusing mostly on nailing down your themes, strengthening your characters, streamlining your plot, and finding imagery to repeat through the story to give it a sense of cohesiveness. You'll need to strengthen your beginning at this point by trying all of these elements into your first few scenes.
But if you're not a plotter like I am, writing a beginning to get off the ground and get your first draft finished is a perfectly acceptable approach as long as you know you'll be editing it heavily later.