The writing sample is an especially important part of an application to a philosophy graduate program. Grade inflation and inflated recommendations have made transcripts and letters less informative than they once were, and the writing sample is used as a reality check on the other parts of the file: if the letters say that the applicant can argue originally and brilliantly, but the writing sample doesn't display those qualities, nowadays admissions committees tend to go with the sample. So if you want to be admitted to strong graduate programs, your writing sample should be as strong as you can make it.
Here's what that means. A writing sample is a philosophy paper that exhibits your ability to develop an extended argument, to write clear and literate prose, and to have original and well-motivated philosophical responses to important philosophical texts or to important problems in the field. Accordingly, it should not be too short (a 5-7 page paper won't show that you can construct a sufficiently complex argument), and it should not be too long (you need to show that you can control sprawl, and at about 20 or so pages of double-spaced manuscript, you should definitely be finishing up). It should not be primarily exposition of someone else's position, or of someone else's argument; what admissions committees need to be convinced of is that you can invent interesting and compelling arguments. And it should not be sloppy; if you don't clean up the spelling, the grammar, and so on you're pretty much telling the admissions committee that you'll do sloppy work in grad school.
Bear in mind that top-tier philosophy graduate programs receive on the order of 350 applications each year, and that the people reading the files are for the most part tired, impatient and anxious to be as expeditious as possible. That means that you should compose your writing sample in something like the way that Hollywood scripts TV shows: what you are trying to do is prevent the audience from changing the channel. So a successful writing sample will make clear at the outset why it is taking up the question it addresses. And it will make clear, at each stage of the paper, what it is doing next and why it is doing it. (If at any point your reader stops understanding what's going on, he or she is likely to change the channel, i.e., drop your folder and pick up the next one.) Being clear and up front about your philosophical motivations, your strategy and where you are in the implementation of your strategy is always a good idea, but in this exercise it is absolutely essential.
Remember, graduate admissions committees are composed of the faculty who will be teaching you if you are indeed admitted. That means that the reaction you're trying to produce is: "Hey, this is something I'd like to get as a term paper in my graduate seminar!" An application containing a writing sample which doesn't produce that reaction is unlikely to be successful.
Good luck!