This question is one that we all ask ourselves with some regularity - I think.
I do agree with everyone's suggestions about practice, books, galleries, critique etc. All those things can help us become more aware of strengths and weaknesses in our compositions.
However, for me at least, the biggest challenge is to become more "self aware" when it comes to my taste and preferences.
I believe that THE most important thing for a photographer is to come to understand and analyze - in great depth - what it is about her/his pictures that make them good, bad, great, horrible etc. Given the vast range of options to create and shape a photography, it's not really any different than creating a painting - although it is with different tools.
Point being that the most crucial part - in my view - is to find a personal and unique way of expressing yourself creatively. And that is more of an inner journey full of harsh self-critique and painstaking disection of what's good and bad.
...but that's perhaps just me...