Az-Zumar: (47–48)
{And there appeared to them from Allah}
A threat to them, the nature of which is unknown due to its horror and intensity. It is similar to His saying—Exalted is He—regarding the promise [of reward]: {No soul knows what has been hidden for them} (As-Sajdah: 17).
The meaning is: There appeared to them from the wrath of Allah and His punishment what they had never accounted for and what they had never imagined for themselves.
It is said: They performed deeds they reckoned were good, but they turned out to be evil.
It is narrated that Sufyan al-Thawri recited this verse and said: "Woe to the people of hypocrisy, woe to the people of hypocrisy."
Muhammad ibn al-Munkadir was distressed at the time of his death. When asked why, he said: "I fear a verse from the Book of Allah," and he recited it, adding: "I fear that there may appear to me from Allah what I did not account for."
{And there appeared to them the evils of what they earned}
Meaning: The evil consequences of the deeds they earned. Or, the evils of their earnings, when their scrolls are presented to them, having been hidden from them—similar to His saying: {Allah has enumerated it, while they forgot it} (Al-Mujadilah: 6).
It is also intended by "the evils": the types of punishment with which they are recompensed for what they earned. He named them "evils," just as He said: {And the recompense of an evil deed is an evil the like thereof} (Ash-Shura: 40).
{And there encompassed them}
Meaning: There descended upon them and surrounded them the recompense of their mockery.
{And when harm touches man, he calls upon Us; then when We bestow on him a favor from Us, he says, "I have only been given it because of [my] knowledge." Rather, it is a trial, but most of them do not know.}