Previously, I've posted about the importance of writing about a topic that you're passionate about. Otherwise, you may not be able to sustain the discipline to finish writing a book.
And Jennifer Weiner, a #1 New York Times bestselling author, advised that one should not sell-out. In other words, one shouldn't write with the sole intention of appealing to an agent or publisher. Instead, write "the story you want to tell". Weiner:
Don’t write something just because you think it will sell, or fit into the pigeonhole du jour [i.e., that's trendy]. Tell the story you want to tell, and worry about how to sell it later.