“A man asked the Prophet (sal Allahu alaihi wa sallam), ‘When will the Hour be established, O Allah’s Messenger?’ The Prophet (sal Allahu alaihi wa sallam) said, ‘What have you prepared for it?’ The man said, ‘I haven’t prepared for it much of Salaat (prayers) or Saum (fasts) or Sadaqa (charity), but I love Allah and His Messenger.” The Prophet (sal Allahu alaihi wa sallam) said, ‘You will be with those whom you love.’” [Sahih Bukhari]
Notice that when the Prophet (sal Allahu alaihi wa sallam) was asked when the Day of Judgement would be, he asked in return ‘What have you prepared for it?’ This is because what matters is not when it will happen, but what will happen to you when it happens. Although nobody knows the exact time of its occurrence, it is sure to happen. Each and every person to have ever lived on the face of the earth will be resurrected and present on the occasion. So when it happens is immaterial. Of much greater significance is the preparation we make for it.
The second and extremely important thing we learn from this hadith is the value of loving the right people. Those who love the prophets, the Shuhada, the Mujahideen, the Siddiqeen, will be with them. The man who asked the Prophet (sal Allahu alaihi wa sallam) was a sincere Muslim. He would discharge his religious obligations (Faraaid) but said that he did not have a whole lot of extra deeds of worship (Nawafil) prepared. However, he loved Allah and Allah’s Messenger. This was reason enough for the Prophet (sal Allahu alaihi wa sallam) to tell him that he would be with him.
On the other hand, those who love sinners, liars, unfair and oppressive people, fornicators, and rebels against Allah, should be prepared to be thrown into the Fire with them. Those who love evil doers, hang out with them, and suck up to them, should be prepared to be their Companions in Hell as well.