When Allah (swt) says:
(أَوَمَن كَانَ مَيْتًا) (And is one who was dead): This indicates a person who is already dead and there is no life in him nor movement. But saying (to die) means that that person is still alive. Like when Allah (swt) says:
(إِنَّكَ مَيِّتٌ وَإِنَّهُم مَّيِّتُونَ)
(Indeed, you are to die, and indeed, they are to die) (Az-Zumur:30)
Allah (swt) was addressing the Prophet (saws) while he was still alive.
( وَجَعَلْنَا لَهُ نُورًا ) (and made for him light): The ‘light’ here is the light of values. A human life means to have both body and soul, while a life of values means the light found within the chest, and its source is the Holy Quran. This is why Allah (swt) says:
(وَكَذَٰلِكَ أَوْحَيْنَا إِلَيْكَ رُوحًا مِّنْ أَمْرِنَا )
(And thus We have revealed to you an inspiration of Our command) (Ash-Schura: 52)
Allah (swt) speaks in many verses about the light of the Holy Quran. For example:
اللَّهُ نُورُ السَّمَاوَاتِ وَالْأَرْضِ ۚ مَثَلُ نُورِهِ كَمِشْكَاةٍ فِيهَا مِصْبَاحٌ ۖ الْمِصْبَاحُ فِي زُجَاجَةٍ ۖ الزُّجَاجَةُ كَأَنَّهَا كَوْكَبٌ دُرِّيٌّ يُوقَدُ مِن شَجَرَةٍ مُّبَارَكَةٍ زَيْتُونَةٍ لَّا شَرْقِيَّةٍ وَلَا غَرْبِيَّةٍ يَكَادُ زَيْتُهَا يُضِيءُ وَلَوْ لَمْ تَمْسَسْهُ نَارٌ ۚ نُّورٌ عَلَىٰ نُورٍ ۗ يَهْدِي اللَّهُ لِنُورِهِ مَن يَشَاءُ ۚ وَيَضْرِبُ اللَّهُ الْأَمْثَالَ لِلنَّاسِ ۗ وَاللَّهُ بِكُلِّ شَيْءٍ عَلِيمٌ
(Allah is the Light of the heavens and the earth. The example of His light is like a niche within which is a lamp, the lamp is within glass, the glass as if it were a pearly [white] star lit from [the oil of] a blessed olive tree, neither of the east nor of the west, whose oil would almost glow even if untouched by fire. Light upon light. Allah guides to His light whom He wills. And Allah presents examples for the people, and Allah is Knowing of all things.) (An-Noor:35)
As well as other many other similar verses.
(يَمْشِي بِهِ فِي النَّاسِ) (by which to walk among the people): Allah (swt) makes an example about ethical matters by using something sensual. Without the light, people collide with each other; similarly, it is the light of values that keeps us safe from the misguided ideas of other people.
(كَذَٰلِكَ زُيِّنَ لِلْكَافِرِينَ مَا كَانُوا يَعْمَلُونَ) (Thus it has been made pleasing to the disbelievers that which they were doing): To make something pleasing is to show it in a way that is different from its true nature so that it becomes acceptable; it is not the true essence of that thing. When Allah (swt) says:
زُيِّنَ لِلنَّاسِ حُبُّ الشَّهَوَاتِ مِنَ النِّسَاءِ وَالْبَنِينَ وَالْقَنَاطِيرِ الْمُقَنطَرَةِ مِنَ الذَّهَبِ وَالْفِضَّةِ وَالْخَيْلِ الْمُسَوَّمَةِ وَالْأَنْعَامِ وَالْحَرْثِ ۗ ذَٰلِكَ مَتَاعُ الْحَيَاةِ الدُّنْيَا ۖ وَاللَّهُ عِندَهُ حُسْنُ الْمَآبِ
(Beautified for people is the love of that which they desire – of women and sons, heaped-up sums of gold and silver, fine branded horses, and cattle and tilled land. That is the enjoyment of worldly life, but Allah has with Him the best return.) (Ali-Imraan: 14)
(To make pleasing) This Arabic phrase is mentioned in the passive form. Similar to when Allah (swt) says: (Thus it has been made pleasing to the disbelievers that which they were doing). Does the use of the passive form mean that Allah (swt) wanted to test the disbelievers by making their deeds appear pleasing to them? No. The passive form was used here to indicate that this embellishment of falsehood comes from the devils of mankind and jinn.
The essential truth in life is that nothing in the realm of Allah (swt) happens without His will (swt); He (swt) gave a reason for everything. Thus, we find the inspiration from the devils and their embellishment of the falsehood mentioned here: (Thus it has been made pleasing to the disbelievers that which they were doing).
Why were bad deeds made pleasing to disbelievers but not to believers? Because believers see through the light of values, while disbelievers do not have a light to walk with among others, and thus they fall for this [false] embellishment. It is wrong to say: “Allah (swt) has done them injustice because He (swt) made their deeds pleasing for them”, but rather because they neither accept guidance nor the light of the Holy Quran.