Novelists and most memoirists should have a finished and polished manuscript before they begin querying. Nonfiction authors should have a finished book proposal and strong sample chapter(s).
However, some authors may be tempted to begin querying early because it can take so long to receive responses from agents and publishers. The thinking goes: Well, the agent probably won’t respond any earlier than a month anyway, and I’ll be done by then, so why not get a jump on it?
But what if the agent responds right away?
Or what if you’re not done in a month? What if you realize your manuscript or proposal needs a lot more work?
You’ll wish you hadn’t started querying. You may end up rushing your writing or editing process (undesirable to say the least), or admitting to the agent/editor that it will take you X weeks or months to follow up, by which point, their enthusiasm may have waned.
To avoid creating a high-pressure or awkward situation, I recommend you wait until you feel the manuscript or proposal is totally done—the best you can make it. That doesn’t mean you have to hire freelance editors or copyeditors or proofreaders, but it does mean fixing or revising anything you know needs attention.