Narrated Asma (radiallaahu `anhaa):
The Prophet (sallallaahu `alayhi wasallam) said to me, “Do not withhold your money, (for if you did so) Allah would with-hold His blessings from you.”
Narrated ‘Abda (radiallaahu `anhu):
The Prophet (sallallaahu `alayhi wasallam) said, “Do not with-hold your money by counting it (i.e. hoarding it), (for if you did so), Allah would also with-hold His blessings from you.”
Narrated Asma’ bint Abu Bakr (radiallaahu `anhaa):
that she had gone to the Prophet (sallallaahu `alayhi wasallam) and he said, “Do not shut your money bag; otherwise Allah too will with-hold His blessings from you. Spend (in Allah’s Cause) as much as you can afford.”
Hoarding is haraam, as is indicated by the report narrated by Muslim in his Saheeh from ‘Amr ibn ‘Abd-Allaah (may Allaah be pleased with him) who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “No one hoards but one who is in error.”
Islam forbids hoarding because of the harm that it causes to people.
The scholars differed as to what is included in hoarding. Some of them said that it refers only to food. Some said that it applies to everything that people need and will be harmed if it is withheld.
But Islam does not forbid saving up wealth in all cases, rather what is forbidden and what a stern warning is issued against is not paying zakaah on one’s wealth. But if a person pays zakaah, he is not included in the condemnation.
Allaah says (interpretation of the meaning):
“And those who hoard up gold and silver (Al‑Kanz: the money, the Zakaah of which has not been paid) and spend them not in the way of Allaah, announce unto them a painful torment”
Abu Dawood (1564) narrated from Umm Salamah (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) said: “That which reaches the level where zakaah is to be paid and its zakaah is paid, is not kanz (hoarded wealth).” Classed as hasan by al-Albaani in Saheeh Abi Dawood.
Al-Bukhaari (1404) narrated that Khaalid ibn Aslam said: We went out with ‘Abd-Allaah ibn ‘Umar (may Allaah be pleased with him) and a Bedouin said: Tell me about the words of Allaah, “And those who hoard up gold and silver (Al‑Kanz: the money, the Zakaah of which has not been paid) and spend them not in the way of Allaah”. Ibn ‘Umar (may Allaah be pleased with him) said:
The one who hoards them and does not pay zakaah on them, woe to him. That was before zakaah was revealed; when it was revealed, Allaah made it a purification of wealth.
Maalik narrated in al-Muwatta’ (595) that ‘Abd-Allaah ibn Dinar said: I heard ‘Abd-Allaah ibn ‘Umar when he was asked about kanz – what is it? He said: It is wealth on which zakaah is not paid.
Ibn Katheer (may Allaah have mercy on him) said commenting on the verse in al-Tawbah:
With regard to kanz, Maalik said, narrating from ‘Abd-Allaah ibn Dinar from Ibn ‘Umar: It is wealth on which zakaah is not paid. Al-Thawri and others narrated from ‘Ubayd-Allaah from Naafi’ that Ibn ‘Umar said: That on which zakaah is paid is not kanz, even if it is buried beneath seven earths, but that which is not buried and on which zakaah is not paid is kanz. This was narrated from Ibn ‘Abbaas, Jaabir, and Abu Hurayrah in both mawqoof and marfoo’ reports. ‘Umar ibn al-Khattaab said something similar: Any wealth on which zakaah is paid is not kanz, even if it is buried in the earth. And any wealth on which zakaah is not paid is kanz with which its owner will be branded (on the Day of Resurrection), even if it is on the face of the earth. End quote.
Thus it is clear that the kind of wealth that is blameworthy is that on which zakaah is not paid. As for that which is beneath the threshold (nisaab), or which reaches the threshold and zakaah is paid on it, it is not kanz.
Thus it is clear that Islam does not forbid storing up wealth, rather it forbids not paying zakaah on it.
[Taken from IslamQA]
Read about the ruling on the one who does not pay Zakaah.