Word length is key to being able to land an agent and/or a publisher. Agents and editors both take it into careful consideration. Expected/accepted lengths differ by genre and by the personal preference of the one you are submitting it to. Here are some loose guidelines in a few of the genres that can be helpful even if you are writing to self-publish as they will give you a rough idea of what is expected both by readers and traditional publishing. Please note: These are for full-length novels, not novellas.
Fantasy: 80,000 to 110,000 A little under is all right, but you will likely be asked to flesh it out some, over by much and you risk having two books instead of one. Not a bad problem to have, but understand that you may be asked to break it up into two books with full story ARC’s worked into both. Many agents and publishers will accept longer fantasy, but be careful not to overdo it.
Paranormal: 75,000 to 95,000. A little under is all right, but if you drop below 70,000, you may be asked to flesh it out, over 95,000 and it will likely get passed by when it comes to agents and publishers.
Science-Fiction: 80,000 to 120,000. Rarely will you find sci-fi under 80k, it’s just too involved for a shorter word count. On the longer side, you can go over, but don’t go crazy. Know when your story and character ARCs need to complete, don’t go beyond it. Close to or more than 120 might mean you are burying the story (and the reader) in too much description and world building. While this genre requires a lot of both, it is a careful balance. If you find yourself going longer than 120k, think about writing it as a series instead of one book.
Historical Romance: 75,000 to 110,000. I wouldn’t really go under on this one because then it is likely that you aren’t putting in enough ‘historical’ to give it the right feel, over and it becomes harder to sell. Even approaching the far end at 110k you need to make sure it is a very compelling novel with a good pace that doesn’t lag.
Can you write a novel shorter or longer? Absolutely. No rule is carved in stone or written in blood. But, if you are way off base on the length, you might need to look closer at your manuscript.