A man follows the religion of his friend
Abu Hurairah, may Allah be pleased with him, narrated that the Messenger of Allah(may the peace and blessings be upon him) said:
"A man follows the religion of his friend, so let one of you look at whom he mixes with.) Mu`ammil one of the narrators has a different wording; look at whom he befriends."
It was narrated by Ahmad, at-Tirmidhi, Abu Dawood and al-Bayhaqi in "The Su`ab Al-Iman." At-Tirmidhi said: it is Hasan Ghareeb, Al-Nawawi said: Its isnaad is saheeh, and was classed as Saheeh by al-Albani.
Selecting friends from the best of people is one of the purposes of the Islamic legislation, upon which good companionship in the hearts is based, as well as cooperation in the fields of righteousness, charity and piety, in addition to the other lofty goals that every Muslim is keen to achieve for himself and other Muslims in particular, and to the other people in general.
Man is sociable by nature - as Ibn Khaldun says - he can not live alone in isolation from people, he can not find any comfort in being distant from them, even if he is in an ivory tower, savoring all the sorts of pleasures because one will not be happy unless he lives with his family and friends.
Friendship has a profound effect in guiding the souls for good or evil, and recommending or misleading the minds, it remains an important factor in the progress or delay of the group; therefore, choosing the righteous friends is a religious duty so that people coexist with each other in harmony that is not disturbed by differences of schools of thought or the vanities of this world, the choice of friends helps in reassuring a life filled with love and prosperity and secured from the plots of the enemies.