Some people asked, "Messenger of Allah, will we see our Lord on the Day of Resurrection?"He replied, "Do you have any difficulty seeing the sun when there are no clouds before it?"They said, "No, Messenger of Allah."He asked, "Do you have any difficulty seeing the moon on the night of the full moon when there are no clouds before it?"They said, "No, Messenger of Allah."He said, "You will see Him on the Day of Resurrection just like that. Allah will gather the people and say, 'Whoever used to worship something, let him follow it.' So those who worshipped the sun will follow it, those who worshipped the moon will follow it, and those who worshipped false deities will follow them. This nation will remain, including its hypocrites, and Allah will come to them in a form other than the one they recognize and say, 'I am your Lord.' They will reply, 'We seek refuge in Allah from you. This is our place until our Lord comes to us. When our Lord comes, we will recognize Him.' Then Allah will come to them in the form they recognize and say, 'I am your Lord.' They will say, 'You are our Lord,' and they will follow Him." The hadith continues.
قال أناس: يا رسول الله، هل نرى ربنا يوم القيامة؟ فقال: هل تضارون في الشمس ليس دونها سحاب؟ قالوا: لا يا رسول الله. قال: هل تضارون في القمر ليلة البدر ليس دونه سحاب؟ قالوا: لا يا رسول الله. قال: فإنكم ترونه يوم القيامة كذلك، يجمع الله الناس فيقول: من كان يعبد شيئا فليتبعه، فيتبع من كان يعبد الشمس، ويتبع من كان يعبد القمر، ويتبع من كان يعبد الطواغيت، وتبقى هذه الأمة فيها منافقوها، فيأتيهم الله في غير الصورة التي يعرفون، فيقول: أنا ربكم، فيقولون: نعوذ بالله منك هذا مكاننا حتى يأتينا ربنا، فإذا أتانا ربنا عرفناه، فيأتيهم الله في الصورة التي يعرفون. فيقول: أنا ربكم، فيقولون: أنت ربنا، فيتبعونه. الحديث.
Bukhari narrated it in the Book of Tawhid (7437), and Muslim in the Book of Iman (182), both from the hadith of Ibrahim bin Saad, from Ibn Shihab, from Ata bin Yazid Laythi, from Abu Hurairah, and he mentioned the hadith in full. See it in full in the collected chapters on the Last Day, chapter on the Sirat being a bridge over Hell.