QUESTION: How do I know when my work is good enough to send out to editors and agents?
Part of the answer is experience. Once our craft and storytelling abilities reach a certain level, some of us have the ability to tell when a work is working.
For those who haven’t reached this level or want more than their own opinion, there are other options.
Craft, the nuts and bolts of writing, isn't subjective so failure at that is an obvious sign your story isn't ready for prime time.
An experienced writer or editor can usually clue you in on that. So can a good writing teacher who can help you improve.
The art of writing is a bit more problematic, but finding readers who are the audience you are aiming for will help there.
Give them a series of questions about different elements of your book so they can give you real and specific feedback. Look at my articles on critiquing for sample lists of questions.
I don't think anyone can tell you if your book, no matter how competent and "good" it is, will succeed in the market. Even books that have been published by great presses and respected editors have either had almost universal pans or have disappeared without a trace. If they can't guess at success, no one can.