Too broad of a spectrum; you can't just narrow it down to one formula. It's like saying what makes a beautiful day or a great person. All of the elements just have to be in line. And even then it is still debatable.
The best approach is to study, work, and practice as hard as you can as a writer. Put your best work out there, take on a story that you're passionate and knowlegable about and give it your best go.