"Whoever believes in Allah and the Last Day, let him say good words or remain silent
Abu Hurayrah (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: "Whoever believes in Allah and the Last Day, let him say good words or remain silent. Whoever believes in Allah and the Last Day, let him be generous to his neighbor. Whoever believes in Allah and the Last Day, let him be hospitable to his guest."
In this Hadīth, Abu Hurayrah (may Allah be pleased with him) conveyed some comprehensive social principles from the Prophet (may Allah’s peace and blessings be upon him). He said: “Whoever believes in Allah”: This is a conditional clause, and the result clause is “let him say good words or remain silent”. This style of speech was used in order to encourage and urge people to say what is good or to remain silent. We have previously explained the meaning of believing in Allah and the Last Day. “Let him say good words”: this applies even if he does not deem his speech good in itself, however, he says it in order to bring happiness to those around him. This is good speech given the affability and amicability that it results in. He then said: "Whoever believes in Allah and the Last Day, let him be generous to his neighbor.” This applies to the person whose house is next to his. It seems that other types of neighbors could be included as well, such as neighbors at work. However, the reference to the neighbor in residence is the more apparent meaning. The closer the neighbor is to you, the greater his right upon you. The Prophet (may Allah's peace and blessings be upon him) said “he should be generous to his neighbor” in the general sense of the word. He did not specify the nature of such generosity. For example, he did not say that such generosity is by giving him money or charity or clothing or the like, but instead kept his statement general. As a rule, everything that is generalized under Islamic Shariah, it should be referred to the customs and traditions of the people. Therefore, generosity mentioned in the Hadīth is not specified by a certain action, rather it refers to whatever the people deem to be generosity. It is also relevant to the condition of the neighbor; if he is poor, giving him a loaf of bread can be an act of generosity. If he is rich, a loaf of bread is not enough in his case. To a humble neighbor, the least thing you offer him can be enough for showing him generosity, unlike a noble neighbor. To determine who is defined as a 'neighbor' — the person living next door or in the store next to you in the market, or the one facing you, etc. — one should refer to people’s custom. The Messenger of Allah (may Allah’s peace and blessings be upon him) then said: “Whoever believes in Allah and the Last Day, let him be hospitable to his guest.” A guest is someone whom you offer temporary accommodation in your house, such as a traveler. It is compulsory to be hospitable and generous with such a guest. Some scholars, may Allah have mercy upon them, said: “Offering accommodation to the guest is obligatory in small towns only. It is not obligatory in large cities, since there are restaurants and hotels where the traveler can stay. Meanwhile, a person in a small town or village needs a place to stay in. The apparent meaning of the Hadīth, however, suggests that the ruling is general.