Allah has forbidden His servants to be extravagant, revealing what the criterion should be when spending:
Muslims spend everything they have in the way of Allah and in the way that would please Him most. They do not forget that what they have is what Allah has given them as a blessing and that they are not the real owners of any of it. When they have to make sacrifices they spend everything they have as commanded by the Qur’an; yet when expenditure is unnecessary they avoid spending even a single penny wastefully. Allah, in the Qur’an, has commanded believers to give their goods to those in need, but not to squander them:
On the other hand, avoiding extravagance should not be misunderstood to mean avoiding the gifts of Allah. He states in the Qur’an “… eat and drink but do not be profligate. He does not love the profligate.” (Surat al-A’raf, 31) In this verse Allah has told believers to enjoy His gifts, and has forbidden them only to spend wastefully. Today, however, in societies remote from Islamic morals, extravagance is not paid the attention it is due. In restaurants and houses, plates of food and huge amounts of bread, fruits and vegetables are thoughtlessly thrown away. But Allah has forbidden extravagance, whether in significant or insignificant amounts. Therefore people should try to find a way to make use of all such provision before they spoil, instead of throwing them away saying, “this has gone off” or “we cannot use this”. Only in this way can they give these gifts their due; otherwise the result is scarcity and ingratitude to Allah.