Complete your manuscript before you ever attempt to query a publisher or agent. While it is possible to write a synopsis prior to writing your manuscript, keep in mind that an agent or publisher will likely want to see your completed manuscript right away, should your synopsis successfully grab his attention. Therefore, you need an actual finished product, not just your selling tool.
Know your market before you query. Agents and publishers have websites that detail the kind of content they're seeking and their own particular submission guidelines. Not all agents or publishers will request a synopsis with the initial query. Some want sample pages, some want just the query itself. It is up to you to do the research to find out what specific guidelines to follow. This can also include how many pages they want to see for your synopsis, which can vary anywhere from one page to more than 10.
Break down your story to outline key points needed for your synopsis. Some authors use a chapter-by-chapter outline. This will not usually have dialogue or flowery details, and it will be fairly utilitarian in regard to specific actions that move the story forward. You can use this as a basic skeleton to ensure all key plot points are included in the finished synopsis, the pace of which will depend on how many pages are required by the agent or publisher.
Use industry formatting on your pages. Use 1-inch margins on all sides and a standard font such as Courier or Times New Standard. Double space the lines, and include a header on the top of every page, which includes the name of your project, your name and the page number.
Start where your story starts. This is true of anything you write, but especially important in a synopsis. This is a much more limited format than your manuscript, and you really have no time to waste before you hook your reader. These are professionals who only allot a certain amount of time before they move on to the next project. Engage her immediately and keep the momentum going from plot point to plot point. Avoid meandering sub-plots unless they somehow figure into resolving your major conflict.
Write in present tense. Be aware it can be very easy to switch tenses when you write, especially if you're not accustomed to writing in the present tense. The most important tip is to avoid passive verbs. Instead of "she is running," write, "she runs." Or better yet, "she sprints," which avoids needless adverbs. This will punch up your writing and economize your words.
Tell your whole story. The temptation may be there to leave out the good stuff, or leave the synopsis on a cliffhanger note that will theoretically make the agent or publisher request the full manuscript. Don't give in to this temptation. The synopsis works as a condensed version that allows your reader to see the story in its entirety to show your ability to construct and resolve a plot, as well as the marketable viability of your project.
Write in the same style of your manuscript. Though you must write in the present tense and in the third person, the style of the narrative needs to match that of your manuscript. If your book is humorous, add the humor. If it is conversational, then be conversational. Infuse your storytelling voice into the synopsis to make it stand out.
Proofread your synopsis thoroughly and repeatedly. Don't depend entirely on your grammar checking tool or your spell check to find all of the errors. Allow someone else to read it, whose mind won't fill in the blanks and skip over errors that you might not recognize because you know how you intended the words to hit the page. Another trick is your reading the synopsis aloud. This will help you tighten up the narrative and make it flow smoothly.