I'm taking the writing sample tomorrow. Here's what I've gathered from online advice:
It isn't scored, but it matters insofar as it demonstrates ability to write an essay under timed conditions and that it roughly matches the quality of your personal statement (given the time constraints of the writing sample) to show that someone else didn't write your personal statement. Don't go in blind, but you shouldn't stress too much on this.
What matters is ability to make a coherent argument from the information given. Don't bring in outside knowledge or try to make arguments unrelated to the information at hand in the prompt.
Look at sample prompts and responses to get a general idea of how the prompt and essay could look. After this, do at least one simulated writing sample so you don't get cold feet on the actual sample.
Different websites suggest different structures. I've seen sites suggest anything from 2-6 paragraphs. The 6 paragraph formats seemed unorganized and too long for the time constraints. The 4 paragraph seems best as it matches traditional essays, demonstrating writing ability, and it seems to best organize the information that is necessary for a good response to the prompt, given time constraints. These paragraphs may not be long; keep in mind your time limit. Here are the suggested formats for 2, 3, 4, & 5 paragraph essays:
2: Body 1 (Argument for your position, with thesis). Body 2 (Counterargument against the opposition).
3: Body 1 (Argument for your position, with thesis). Body 2 (Counterargument against the opposition). Conclusion (restate thesis and strongest points).
4 (Best option in my opinion): Intro (Restate information given and provide thesis). Body 1 (Argument for your position). Body 2 (Counterargument against the opposition). Conclusion (restate thesis and strongest points).
4b (IRAC): Issue (state the issue that you are being asked to analyze). Rule (state the criteria). Application (apply the criterion to both sides). Conclusion (explain why your position is best given the facts).
5: Intro (Restate information given and provide thesis). Body 1 (1st Argument for your position). Body 2 (2nd Argument for your position). Body 3 (Counterargument against your position). Conclusion (restate thesis and strongest points).