There are two answers to the question of what defines a good meditation. Both are valid, but one answer is more useful than the other.
The first answer would be that a good meditation is one where you feel concentrated, where you’re enjoying yourself, and where there aren’t many distractions. This is probably the most common answer that people would give, and it’s the least useful.
The second answer would be that a good meditation is one where you have taken every opportunity to return your attention to the breath — no matter how distracted you have been. So you might have been very distracted, but every time you realized that you had been distracted you’d taken your awareness back to the breath. This is a much more useful way to think of what a good meditation consists of.
The reason that the second way of looking at this question is more useful, is that “good” meditations of the first type will come and go, whereas you can always have “good” meditations of the second type. Also, this is a more realistic way of looking at things. In meditation you’re working to alter your mental and emotional habits. You’re subtly changing your personality.
In a “good” meditation of the first type you might be having an easy time of it — your practice is very enjoyable — but you might not be actively engaging with yourself. You might actually be rather passive. But a meditation where you have really worked — even though you’ve experienced a lot of distractions and not had an easy time of it — that is a good meditation.