I spent a good 20 minutes during my General Ordination Exams (GOEs) looking for this passage from Matthews Gospel. The sheep and goats, or whatever it was my Bible called it, is for many a very troubling text. In fact, I think the only people for which it might be easy is pre-reformation Roman Catholics who, no doubt, used this text and its apparent works righteousness as more fuel for the money making fire.
What I hear in this text today, which is consistent with where I've been in my pondering of the judgment day recently, is that Jesus is calling on his followers to pay attention. Walking through life with a me-first attitude means missing the hungry, thirsty, imprisoned, etc. Living as one who is fully other-focused means seeing those in need, and as a follower of Christ it further means your hearts deepest desire will be to offer them comfort and peace.
In our Baptismal Covenant this lifestyle is called "seeking and serving Christ in all persons." If you aren't paying attention, you certainly aren't seeking.