Qillat-e-Ikhtilaat Maal Anaam (Reducing association with people)
Unnecessary association with people should not be augmented. Remember that besides Allah, there are three kinds of association.
As long as the relationship with the Creator is not well-established and grounded, association with the creation is extremely harmful. The ostensible reason advanced for association with people, viz., fulfillment of their obligations, can be truly fulfilled only it the relationship with the Creator has been firmly grounded, If the relationship with Allah has not been firmly established then neither is the duty to creation fulfilled nor the duty to the Creator. This fact has been proven by the experience of thousands of Auliyaa,
Solitude is permissible, in fact best and advisable (Afdhal) for one who has no worldly or Deeni duty pertaining to himself or others to discharge. Such solitude is of greater merit during times of strife and mischief when it becomes difficult to have patience (sabr) in the face of anxiety, agitation, confusion and anarchy. The Ahaadith have extolled solitude during such circumstances. Rasulullah Sallallahu Alayhi Wasallam said in this regard:
" a man who takes to solitude on the peak of a mountain. He has goats, he fulfills their right and makes the Ibaadat of Allah."
In another Hadith it appears:
"Soon a time will dawn when the best wealth of a Muslim will be goats. He will go with them to a peak of a mountain and to places where rain-water accumulates. He will flee from mischief taking along his Deen."
Bukhaari
Solitude (i.e. total dissociation from people) is not permissible for one who has some duties and obligations to discharge, whether such duties pertain to others or oneself, and whether it be obligations, e.g. providing maintenance to one's family when one does not have the ability of Tawakkul (trust in Allah), or Deeni obligations, e-g- the acquisition of necessary Deeni knowledge. Certain Ahaadith which prohibit solitude refer to these two states just mentioned. Such an example of prohibition is the case of Hadhrat Uthmaan Ibne Maz'un Radhiyallahu Anhu. He was forbidden from adopting solitude since he was yet in need of acquiring knowledge of the Deen. At the same time Muslims also were in need of him regarding matters of the Deen, especially in the fields of spreading the Word of Allah and developing Islam.
The above explanation pertains to solitude which is adopted permanently. However, temporary solitude (Khalwat) of a few days is necessary for the Mubtadee (beginner in Tasawwuf) in the majority of cases.