Almighty Allah says: “O you who have believed, let not your wealth and your children divert you from remembrance of Allah. And whoever does that - then those are the losers. And spend [in the way of Allah] from what We have provided you before death approaches one of you and he says, "My Lord, if only You would delay me for a brief term so I would give charity and be among the righteous." But never will Allah delay a soul when its time has come. And Allah is Acquainted with what you do.” (Surat al-Munafiqun: 9-11)
Almighty Allah commands the believers to mention His name and remember Him constantly and not to let their wealth nor their children keep them distracted from the remembrance of Allah Almighty. Allah tells them that those who let the pleasures of this worldly life divert them from the remembrance and obedience of the Lord will be losers for they will lose themselves and their families on the Day of Judgment.
Almighty Allah urges the believers to spend from their wealth in His cause and obedience of His commands. He has given them their wealth and made them successors so they should spend from it in His cause before it is time for their death. Upon facing death, the people who did not fulfill their obligations to obey Allah and spend in His cause and eventually did not garner His contentment would say: O Allah, if You just give us a short period of time as a chance to spend in Your cause and obedience, fulfill Your commands and be one of Your righteous sincere worshippers with whom Your are pleased.
Almighty Allah says to those people that they should have done acts of obedience and spend in causes of goodness and kindness before it was the time for their death, because when this time comes there is no chance of delay or procrastination and Allah is indeed Acquainted with what people do.
Money and children can preoccupy a person making him oblivious to everything else, that is, unless his heart alerts him to the aim of his existence, making him feel that he has a superior goal. This goal must be one that is worthy of the creature in whom Allah has blown of His own spirit, giving him the aspiration to achieve a few divine characteristics, albeit within his own human limitations. Allah has given him riches and offspring so as to fulfill his task of building human life on earth, but not so that he is so fully preoccupied with them that they distract him from remembering Allah and from being in contact with the source of his humanity. Those that are so distracted "…then those are the losers…" (Verse 9) The first thing they lose is their human identity, which is dependent on maintaining the bond with the source of man's humanity. Whoever loses himself has lost everything, regardless of the size of his wealth and the number of his offspring.
With respect to charitable donations, the surah here touches their hearts in several ways: "And spend [in the way of Allah] from what We have provided you…" (Verse 1O) This reminds us of the source of all that we have. It is from Allah in whom we believe and who instructs us to be generous and charitable. Such giving should be done "before death approaches one of you…" It should be a result of the person's own action before death overtakes him and he leaves everything behind for others to enjoy. If he does not do so then he will look around only to discover that he has put nothing forward for his own salvation. This is the worst stupidity and the greatest loss.
He will then feel pangs of regret and wish he could have more time to be charitable and join with those people who are righteous. Such wishes benefit him nothing, for "…never will Allah delay a soul when its time has come." (Verse 11) How can he now put forward anything when the chance is gone? "And Allah is Acquainted with what you do." (Verse 11) Several touches within a short space are thus made at the right place, immediately after depicting the hypocrites' characteristics and their scheming against the believers. When the believers stand firm in Allah's own rank, they will be protected against the hypocrites. It serves them well, then, to fulfill the duties that their faith requires of them. They must never abandon their remembrance of Allah, as this is the source of their ultimate safety. Thus does Allah use the Qur'an to educate and cultivate believers' minds and hearts.