There really are two things you need to sell as a writer: the competence to write something well, and the confidence to send it out into the world.
The challenge is, of course, having sufficient amounts of both is rarer than people think.
I'm not going to sell any sort of "writers are precious snowflakes of natural talent and only the select few are allowed into the hallowed chamber" crap. But it is a skill, which must be practiced and honed to reach competence. An writing is a lot like sex: most people do it, but just because you enjoy what you're doing doesn't mean you should be a professional.*
Now, how do you know if you are a competent writer? Frankly, the best sign is that someone is willing to invest in it. A publisher or agent getting behind it, or people willing to buy off a sample.
Of course, to put your work out there so that a publisher, agent or reader can have the opportunity to invest in it, you've got to have the confidence in yourself to send it out.
I've seen plenty of people who are constantly re-writing and workshopping a work into oblivion, swearing that it'll be ready to be shopped "soon". And the work is very good, and they should be querying. But they aren't. High competence, low confidence.
And, on the flip side, I've seen several things which have no business being put out there, but people are trying desperately to have it sell. And I get the sense that they honestly think it's really incredible work.
Maybe it actually is, and I'm the one with Dunning-Kruger. Maybe I don't know what is and isn't any good.
In the meantime, I'm confident enough in my own work to keep putting it out there, and the results are showing me that I'm fairly competent at what I'm doing.
But there's always room for improvement.
*- Alternative: Work that gets you praised in high school is probably sloppy and amateurish in the adult world.