I've seen a number of stories by authors who don't seem to know who their audience is. This problem can occur in any genre of fiction (or non-fiction, for that matter), but I've seen in most often in YA. The problem with YA is that we think of YA as having one homogeneous audience (generally called "teens"), but that's not actually true. Depending on who you ask, YA can include anyone between age 12 and 21 (and we know that many adults read YA too!). Even a more conservative range of 13-18 is actually quite wide when you think about it--an eighth grader may find books written for college freshmen completely inaccessible, and vice versa.
Today I read a partial in which the writing style and characters were more suited for younger YA readers, while certain aspects of the plot were definitely more adult. A 12-year-old would have enjoyed the story on the whole, but several key scenes would have been completely inappropriate for someone so young; on the other hand, an 18-year-old would have been fine with those scenes, but the rest of the story would have been too immature for them to want to read. It was as though the author was trying to target both audiences, but, in doing so, wasn't able to capture either of them. I had to recommend passing on the manuscript.
So what can the author do? Before you start writing your story, stop and think of who your ideal reader is. For YA, narrow down a particular age--not just "teens" but a more narrow age group. For adult authors, age is not as important as "stage of life"--are you writing for young, single women or widowed retirees? If your book is about a certain segment of the population--be it based on religion, education, gender, culture, profession, or anything else--consider how accessible this segment is to the general population. For example, you don't need to be a doctor to enjoy a medical drama, but if every other word is a highly technical term of art that only trained physicians would understand, you are severely limiting your audience to only doctors to enjoy reading about doctors rather than everyone who enjoys reading about doctors.
Once you know who your audience is, you'll be able to better focus your writing to target that particular group of readers. If you're afraid your audience is too narrow, you can either reconsider your target audience or you can take extra care as you write to make the story accessible to other readers as well--not necessarily changing your target, but just making it a bit larger. But make sure, no matter how wide or narrow your audience is, you know who those readers are and what they enjoy to read, because otherwise the only audience for your book is going to be yourself.