Earlier I mentioned things like the music and the images used in a poem and then a third thing (maybe I’ll call it the connotations). But what needs to precede all of that is that the poet has something to say. It’s conceivable that he could use mediocre music and less than perfect imagery and still write a good poem because what he is revealing carries so much weight in and of itself.
This is particularly true of a poem that speaks to an individual. For example, I might come across the notoriously manufactured Hallmark section at Target and find a verse that expresses something I feel for my wife or child. It is unlikely that we are looking at a good poem, but it might just fit the bill.
But I doubt it could happen very often. Furthermore, if Hallmark expresses my emotions well, I probably need to cultivate, refine, and better understand that particular emotion.
To summarize, the purpose of a poem is to verbally embody an idea effectively. If the idea (which includes the subjective feelings attached to the idea) is effectively expressed in words it will be because the poet has made effective and appropriate use of music and images (and that third thing).