Choosing and having good companions is extremely important for many reasons and from many aspects.
1. Mankind cannot live alone; every individual must live and interact with others, and when interacting with others one either influences or is himself influenced.
2. Those people whom you sit with and make your friends are inevitably going to fall into one of two categories. They will either be good individuals - who guide and encourage you towards what is good and help you to accomplish that which Allaah has ordered, or they are going to be bad - encouraging you to do what is pleasing to Satan, that which misleads you, and leads you to the Hell-Fire.
3. When the Prophet (peace be upon on him - PBUH) was sent with the mission to establish Islam, he did not do it on his own. Rather, Allaah chose for him companions who accompanied him and who carried the Message until it was complete.
These three aspects show the importance of having good companions, companions who are righteous. Such a companion will help you to do what is good and remind you of Allaah, he will enjoin what is good and forbid what is evil. These aspects also show the importance of avoiding befriending bad companions, because such a companion will have a bad effect upon you, they help you to do those deeds which are displeasing to Allaah and which lead to the Hell-Fire.
The Prophet (PBUH) gave a good similitude regarding this. He (PBUH) said: "The case of the good companion and the bad companion is like that of the seller of musk and the blower of the bellows (iron-smith). As for the seller of musk, he will either give you some of the musk, or you will purchase some from him, or at least you will come away having experienced its good smell. Whereas the blower of the bellows will either burn your clothing, or at least you will come away having experienced its repugnant smell." [Al-Bukhaari and Muslim]
The Prophet (PBUH) explained the matter of good companionship, so that no room is left for doubt or confusion, when he (PBUH) said: "A person is upon the religion of his close friend, so beware whom you befriend." [Abu Daawood and At-Tirmithi]
This means that a person will be upon the same methodology as his friend, the same path as his friend, the same nature, manner and behavior as his friend. So we must be careful whom we befriend. There is an Arabic saying: `Your companion is what pulls you to something.` So if your companion is good, he will pull you towards that which is good. He will order us with what is good and forbid us from what is evil. If he observes us committing sins he would warn us, if he becomes aware of our shortcomings he would advise us, and if he finds a fault in us he would cover it and not disclose it to others. About this, the Prophet (PBUH) said: “…Whoever conceals (the fault of) a Muslim, Allaah will conceal his fault on the day of Judgment.” [Abu Daawood]
So should you see a fault in your brother, you should wish to remove that fault from him and not expose it to the people. This is what is required by brotherhood and again stresses the importance of choosing friends who are upon the correct way, who are loyal, and who hide your faults whilst ordering you with good and forbidding you from evil, who stand beside you and support you, and co-operate with you upon all that is good.
This principle is important from the standpoint of how the religion is to be established, and from the standpoint of what brotherhood is and what it does. Indeed, the reason that one takes a companion is to help him establish Islam, and to help him worship Allaah. We find a good example in the Prophet Moosaa (PBUH) the one whom Allaah chose and spoke to. When Allaah sent him to Pharaoh, he (Moosaa) (PBUH) said as Allaah informs us saying (what means): "And appoint for me a helper from my family, Haaroon - my brother; increase my strength with him, and let him share my task (of conveying Allaah`s Message and Prophethood), that we may glorify You much and remember You much." [Quran; 20: 29-34]
Moosaa (PBUH) wanted his brother to support him and help him, protect him and accompany him. This is exactly what the believers do for one another. For the thing that binds the believers together and makes them brothers is the bond of faith. The Prophet (PBUH) said: "There are three characteristics; whoever has them will taste the sweetness of faith: That Allaah and His Messenger are more beloved to him than all else, that he loves a person and does not love him except for the sake of Allaah, and that he would hate to revert to unbelief just as he would hate to be thrown into the Fire." [Al-Bukhaari and Muslim]
Thus the connection between the believers is based upon faith and sincere brotherhood. Beware against taking any companion if such companionship is based upon other than this, for if you were to do that you would then bite your hands in grief. Just as the unjust ones will bite their hands in grief. Allaah Says (what means): "And (remember) the Day when the wrong-doer (oppressor, polytheist etc.) will bite at his hand, he will say: ‘Oh! Would that I had taken a path with the Messenger. Ah! Woe to me! Would that I had never taken so-and-so as a friend! He indeed led me astray from the Reminder (the Quran) after it had come to me….’" [Quran; 25:27]
And Allaah Says (what means): "And whosoever turns away from the remembrance of the Most Beneficent (Allaah), We appoint for him Satan to be a Qareen (intimate companion) to him." [Quran; 43:36]
So all of the physical togetherness that you see around you, which is based upon other than faith will be wiped away on that Day, and it will be a source of misery and torture for them. Allaah Says (what means): “Friends on that Day will be foes one to another except the pious." [Quran; 43:67]