Although keeping your audience in mind is important, I personally believe that an interest in the topic you are writing about is vital in any project. Passion for a subject is extremely apparent in any writing, whereas disinterest often leads to an uninspired or "run of the mill" piece that leaves the reader unsatisfied. However, once you've selected a topic that interests you, it's beneficial to be aware of the audience that will actually be reading what you've written. This can affect word choice, tone, or even the content of your writing. Audiences are obviously going to be more receptive of a piece that is written specifically for them.
Overall, audience and subject are going to vary in importance at different stages of the writing process. In selecting a topic, an interesting subject is more important than the potential audience, while when you actually start writing you should consider the audience that will be reading your work.