Say: “ Allah is a sufficient witness between me and you. He is certainly aware of and sees His servants.” ( Surat al-Isra', 17:96)
Allah has no beginning and no end, is the sole absolute Being, and is not bound by such human concepts as time or space. Therefore, everything that ever happens, regardless of whether it happened in the past, the present, or the future, are the same in—and are fully known to—His Sight.
He knows everything, whether it is done in secret or in public, in darkness or in light, while alone or while in a crowd. Being ignorant, people assume that what they do at night might conceal their sins and hide them as well. But such hopes are futile, for the Qur'an states:
Do you not see that Allah knows what is in the heavens and on Earth? Three men cannot confer together secretly without Him being the fourth, or five without Him being the sixth, or fewer than that or more without Him being with them wherever they are. Then He will inform them on the Day of Rising of what they did. Allah has knowledge of all things. ( Surat al-Mujadala, 58:7)
Allah is fully knowledgeable of everyone's intentions, thoughts, and deeds at every one moment. Each of us will be called to account for all of these on the Day of Judgment. People who deny these truths will understand their mistake on the Day of Judgment. As “On the Day Allah raises up all of them together, He will inform them of what they did. Allah has recorded it while they have forgotten it. Allah is a Witness of all things” ( Surat al-Mujadala, 58:6) maintains, in the Hereafter we will be repaid for each one of our deeds:
You do not engage in any matter, recite any of the Qur'an, or do any action without Our witnessing you while you are occupied with it. Not even the smallest speck eludes your Lord, either on Earth or in heaven. Nor is there anything smaller than that, or larger, which is not in a Clear Book. (Surah Yunus, 10:61)
But Allah bears witness to what He has sent down to you. He has sent it down with His knowledge. The angels bear witness as well. And Allah suffices as a Witness. ( Surat an-Nisa', 4:166)
Whether We show you something of what We have promised them or take you back to Us, they will still return to Us. Then Allah will be witness against what they are doing. (Surah Yunus, 10:46)
We will show them Our Signs on the horizon and within themselves until it is clear to them that it is the truth. Is it not enough for your Lord that He is a witness of everything? (Surah Fussilat, 41:53)