Abbas - Tanwîr al-Miqbâs min Tafsîr Ibn ‘Abbâs
(If good) conquest and the spoils of war as on the Day of Badr (befalleth thee (O Muhammad) it afflicteth them) i.e. the hypocrites, (and if calamity) killings and defeat (befalleth thee) such as during the Battle of Uhud, (they say) the hypocrites, 'Abdullah Ibn Ubayy and his host, say: (We took precaution) by staying at home before the calamity took place, (and they turn away) from jihad (well pleased) with that which has befallen the Prophet (pbuh) and his Companions on the Day of Uhud.
If good fortune, such as a victory or [a taking of] some spoils, befalls you, it vexes them; but if an affliction, some hardship, befalls you, they say, ‘We took our precaution, judiciously — when we stayed behind — before’, before this act of disobedience; and they turn away, rejoicing, at what has afflicted you.
(but if a calamity overtakes you, they say: "We took our precaution beforehand,''), they say, we took precautions when we did not join him,
وَيَتَوَلَّواْ وَّهُمْ فَرِحُونَ
(and they turn away rejoicing.) Allah directed His Prophet to reply to the perfect enmity they have towards him,
(Say), to them,
لَّن يُصِيبَنَآ إِلاَّ مَا كَتَبَ اللَّهُ لَنَا
(Nothing shall ever happen to us except what Allah has ordained for us.) for we are under His control and decree,
(He is our Mawla.), Master and protector,
وَعَلَى اللَّهِ فَلْيَتَوَكَّلِ الْمُؤْمِنُونَ
(And in Allah let the believers put their trust) 9:51, and we trust in Him. Verily, He is sufficient for us and what an excellent guardian.
Maududi - Sayyid Abul Ala Maududi - Tafhim al-Qur'an
In this passage a demarcation has been made between the attitudes of a man of the world and of a man of God. Whatever the man of the world does, he does it to please his own self. He exults if he attains some worldly ends but feels utterly dejected if he fails to attain them. Besides, he depends entirely on his material resources for his success and feels encouraged if these are favorable, but loses heart if these are unfavorable.
In contrast to the man of the world, whatever the man of God does, he does it to please Him and trusts in Him and not in his own powers nor in material resources. Therefore he is neither exultant over his success in the cause of Allah nor loses heart by failure, for he believes that it is the Will of God that is working in both the cases. Therefore he is neither disheartened by disasters nor is filled with conceit by successes. This is because he believes that both prosperity and adversity are from Allah and are nothing but a trial from Him. Therefore his only worry is to do his best to come out successful in His test. Besides, as there are no worldly ends before him, he does not measure his success or failure by the achievement or failure of his ends. On the other hand, the only object before him is to sacrifice his life and wealth in the Way of Allah, and he measures the success or failure of his efforts by the standard he achieves in the performance of this duty. Therefore if he is satisfied that he has done his best to perform this duty, he believes that he has come out successful by the grace of God, though he might not have been able to accomplish anything from the worldly point of view; for he believes that his Allah in Whose cause he has expended his life and wealth will not let go waste the reward of his efforts. As he does not depend on the material resources only, he is neither grieved if they are unfavorable, nor feels exultant when these are favorable. His entire trust is in God Who is the controller of all the resources; therefore he goes on doing his duty even under the most unfavorable circumstances with the same courage and perseverance that is shown by the worldly people unfavorable circumstances alone. That is why Allah asked the Holy Prophet to say to the hypocrites, "There is a basic difference between you and us in regard to the conduct of affairs. We believe that both the good and the bad are from Allah: therefore the apparent result does not make us happy or sad. Moreover, we depend on Allah in our affairs and you depend on material resources: so we are content and happy in all circumstances."