I am so happy for a writer friend of mine. She has been working on her novel for five years - yep! that's right - five years - and FINALLY got it to that sweet spot where she knew it was ready to start querying. She'd queried it before in another form and generated interest, even did a full rewrite for an agent at their request, only to have them pass. However, instead of that destroying her confidence, she dove back into the manuscript and kept what advice she found useful and brought it back to the story she wanted to tell, not the story somebody else was looking to hear.
Several years and many rewrites later, she sent out ten queries in her first week and instantly got three requests for the full from three top agents. This is the amazing stuff every writer wishes would happen to them. However, when you hear of someone's insta-success, or a huge amount of interest in their book straight out of the gate, there's usually a story behind it. There's usually years of hard work, agonizing rewrites, painful hours of cut and paste and spell check and tears, moments of wanting to give it up, moments of thinking it's there only to realize it's not. Sure, instant successes happen, but it's important to remember that nothing worth having in life comes without hard work. Writing is hard work, and although sometimes it's hard to keep the optimism level high and the words flowing, the only way to get your novel to where you want it to be is by doing the work.
So how do you know when it's done? The truth is - it's never done. There is always something, upon reflection, that you find that you wish you could tweak or change. For a novel to be ready, it must undergo many revisions. When I get feedback, I read it through and see if I honestly agree with it. If just one person says it, I mull it over and see if it feels right. However, if two or more people say it, I change it without hesitation. Then it's no longer a subjective thing; it's an identifiable problem.
If you send your book out in the world when the feedback coming back is still saying something needs attention in one way or another, you are only short-changing yourself opportunity. You only get to query an agent once with a project, unless they request changes or you've made a substantial revision and they initially expressed strong interest, in which case you can certainly contact them and see if they would be open and willing to reconsider your work.
When you feel your book is truly done, be honest with yourself. Are you just sick and tired of working on it and it is what it is? Have all previous concerns from feedback you've received been addressed? Were there things you received feedback on that you stubbornly refused to change, and if so, why? Are you just anxious to get it out there already? If your answer to any of these questions is yes, do yourself a favor - take a step back. Because guess what? Your novel probably isn't ready. And the beautiful thing is - at this stage in the game, time is on your side. There are no deadlines save the self-imposed ones. You have the luxury of being able to take all the time you need to make it right, and in the end, it will have been worth it.