I'm a great believer in writing your first draft for yourself -- not getting hung up on who your audience is, whether your protagonist's age is going to be more suited to children's fiction or YA, whether your audience is going to prefer first person, present tense; third person, past tense; or some other combination. The first draft should be for the story -- and if you're lucky enough to write in that white-hot streak of creativity where the words are pouring out, then you should let them pour. Don't hold them up with some internal editor. Let that come later.
When the draft is finished, it's great to have a gut read: a quick read where you mark passages that aren't working, logic problems, places where the pacing sags. This isn't a fine line edit -- in fact, I don't allow myself to hold a pen when I'm doing a gut read. If I have a pen in my hand, then I'll be tempted to correct those little typos, the missing apostrophe, and I'll lose the impetus of the story. I'll do my gut read with a highlighter and just put a vertical line alongside the parts that aren't working. Then I'll come back later and look at these passages more critically, more analytically, but not during the gut read -- this is just time to note the problem and move on.
Then comes the next draft (and the next and the next). If you're writing for publication, then this is the time when you need to start thinking about your audience. Who are you writing for? Is this story suited to your target audience? Is it too complex for children? Too unsophisticated for adults? Too boring for teenager? Is the language appropriate? What about sentence structure and length? Are the paragraphs too dense? Too long? Is there a good mix of narrative to dialogue? Are you showing rather than telling? Are you opening up enough story questions for your reader to want to keep reading? Is there enough conflict? Does the tension escalate? There are lots of things to think about.
If you're not writing for publication, then you don't have to worry about these questions. You're writing for yourself so you can just do what you want. There's nothing wrong with not writing for publication, as long as you are clear that this is what you're doing. Most serious writers, however, do want to be published, and if you do want to be published then at some stage you need to think about your market and what that market wants -- what the gatekeepers (editors) who select the stories that will be published want. What are they publishing? Why? Go take a look at their recent releases -- are they like your book? How? How are they different? If they're not at all like your book, are you targeting the right publisher? Research is the key.
Some writers write for different audiences and use different pseudonyms so that the reader is clear about what type of book they're buying -- for example, Megan Lindholm writes urban fantasy but epic fantasy as Robin Hobb. Iain Banks writes mainstream fiction, but science fiction as Iain M Banks. Some children's writers will write erotic fiction using a pseudonym to protect their identity. It's all about meeting reader expectations. I know writers who love Robin Hobb stories but not Megan Lindholm ones, and others who love only the Megan Lindholm ones. It helps if you're a reader to know which books are which, and it helps as a writer to know this too, as it dictates your approach. Knowing your audience isn't about shutting doors, but opening them -- helping you to get your book through the doors you want to get it through.