This a highly subjective question, so this is just my opinion. Some important elements are fairly obvious: have a compelling story and characters and edit the story to clean up any bad grammar or spelling. Beyond that, I feel that good writing should embody the writer's passion for their work. Also, a good balance needs to be made between too much and too little description. Too much and the story begins to plod along, too little and the pacing gets thrown off. The same is also true of the old adage of 'show, don't tell.' A balance needs to be struck. Reading an entire novel that's all show with no telling whatsoever would almost be as tedious for me to read, as one that had far too much detail.
I have used some real life experiences into some scenes I've written. For example, there's a scene in Coffee-to-Go where a nurse is trying to force Leo to eat food with dairy in it, completely ignoring his protestations to being lactose intolerant. That scene was inspired by a similar incident involving a nurse and my grandfather.
Playing the video game Dragon Age: Origins inspired me to write my first fiction story. That video game has a very rich, complex story structure, but I wanted to extend a few options further than the game would allow. This inspired me to write the scenarios I wanted to explore. Since then, my writing has evolved, and while I still have fun diving into fan fiction stories, I am fully invested in writing and publishing more original works.