Toward the end of the verse their reward is described that they shall be graced with the best reward for their actions by Allah Ta’ ala, and then the verse says: وَيَزِيدَهُم مِّن فَضْلِهِ (and will give them more out of His grace - 38). It means that their reward will not end with the recompense against the good actions, but some extra reward will also be given on His own وَاللَّـهُ يَرْزُقُ مَن يَشَاءُ بِغَيْرِ حِسَابٍ (and Allah gives whom He wills without counting - 38), that is neither Allah is bound by any rule nor does His treasure gets depleted. He grants unlimited sustenance to whomever He likes.
So far the righteous believers were described whose chests are the niches for the Nur of guidance and who readily accept the Nur of guidance. In verses 39 and 40 those disbelievers are being described who were given in their nature the Nur of guidance by Allah Ta’ ala, but when Allah's revelation reached them to lit them up, they turned away to reject it and lost the Nur to stay in the darkness. Since the disbelievers and atheists are of two types, therefore, two examples are related here. One category is that of those disbelievers who believe in the Dooms Day and Hereafter, and have faith that some of their good acts, according to their own reckoning, will be rewarded in the Hereafter. The second category is that of atheists, who do not believe in the Hereafter and the Dooms Day.
The example of the deeds of the first category is that of a mirage, which is nothing but illusion of sight. In a level plain the shining sand creates the illusion of water from a distance, and as a thirsty person approaches near it, the illusion (mirage) disappears, leaving the thirsty completely exhausted, who ultimately dies of thirst. Similarly, a disbeliever's deeds are like a mirage which he considers of value and benefit, but in actual fact they are no better than an illusion, like mirage, and as a thirsty person discovers the illusion when it is too late, in the same way the disbelievers will find out their blunder in the Hereafter, when it will be of no avail.
The second category of deeds is that of atheists or infidels, for which the example of a deep ocean is given, which is completely dark. In the first place it is dark because of its depth, then it is covered by a big wave which is also enshrouded by another wave, and over that there is a mass of dark cloud. In short there is darkness over darkness, so much so that if someone takes out his hand, he cannot have even a glimpse of it. The inference to be drawn from this example is that those infidels who deny the coming of the Dooms Day, the Reckoning and the Hereafter are devoid of even the illusive Nur, which the first category of disbelievers had. Although they too did not possess the useful Nur of guidance, but at least they were under the illusion that they had done some good deeds which will help them in the Hereafter, but the latter category did not deem it necessary to work for the Hereafter, since they had no belief in it. Hence, they will have nothing but darkness and complete darkness with them on the Dooms Day.