Some people say to write what you know. Others say write for the market. Still others say write the book of your heart.
I have to go with the last advice. Too much time and effort is involved to write a book I don't have any interest in. There's no way I can get into my characters' heads unless I'm fully engaged. Still, even if I become emotionally involved, that doesn't mean during and after the process I should ignore potential marketing areas.
To me, what good is a book if no one reads it? By the time my manuscript is finished, I need to figure out what likely candidates will read it.
Here are some questions I ask myself to figure out the market:
What genre or cross-genres does my book belong to?
Where does the action take place?
What occupations do the characters pursue, or are they retired, or incapacitated?
Do the characters have any hobbies?
Are any organizations featured in the book?
What about causes or volunteer work?
What about financial class?
Those are a few clues I use for finding markets for a book. Do any of them work for you? Do you know any others?