Using Life Experience in your Writing

'Write what you know' is a common piece of advice for writers. One of the ways of doing this is to use your life experiences - they provide a rich seam of inspiration.
This doesn't necessarily mean writing a biography, but rather that you build some of your experiences into the lives of your characters: if your protagonist loses someone close to them, your own experience of grief will help you express your protagonist's feelings.
It is helpful to keep a diary or journal, because it gives you a record you can return to describing how you felt in a particular situation, and how you dealt with it.
Similarly, the experience of close friends can also add depth to your writing, particularly if they dealt with it differently to you, or if they have experience that you don't have. The tricky thing with this is not to alienate your friends and family - I would always ensure that it is not easy to identify whose experience I have used in my writing. DH Lawrence caused a stir by writing about the scandalous behaviour of his community, and in some cases, by using their names!
Of course, your experiences can also inspire a story - the flash piece "Shopping for Men" was based on a shopping trip with my Father-in-law, and a piece I wrote for Prima was a humorous account of a faux pas I made when I first moved to the UK.
Writing from experience adds depth to your work, and can provide a writer with a wealth of inspiration.