Why is solitary confinement used so widely? Prison isolation is likely so hard for inmates because people are sociable creatures. Yet, isolation is still used in prisons ('supermax prisons'), in mental hospitals, but also as a strategy to educate children, given that some parents lock their kids in their room.  

Why are those isolations in use? Do they have beneficial effects on prisoners or psychiatric patients? Does it treat their symptoms or criminal traits?
Solitary confinement serves no therapeutic purpose. Two uses of solitary confinement are generally acknowledged, namely as safety measure to protect the individual from themselves or to protect others from harm, or as a measure of discipline (that is, punishment). 

Deprived of normal human interaction, many segregated prisoners reportedly suffer from mental health problems including anxiety, panic, insomnia, paranoia, aggression and depression (Haney, 2003). In experimental subjects hallucinations have been reported too (source: Frontline).

To the question why these psychological effects happen there is not much known, as research into the topic is obviously deemed not ethical, and the use of it in correctional facilities and psychiatric wards is scrutinized. In fact, its use in psychiatric environments is starting to decline (source: APA). 

However, some guesses might be made on the effects of solitary confinement on the brain. Hallucinations may be caused by the fact that sensory perception is accustomed to dealing with a large quantity of information. In fact, one of the major goals of the higher sensory centers is the filtering of irrelevant information rather than processing all of it. When sensory input is deprived, the brain starts to make up things, just as deaf people may develop tinnitus and blind people may see phosphenes and other visual hallucinations (source: BBC Future). The psychological deficits may be sought in the fact that we derive meaning from our emotional states largely through contact with others. Human emotions are thought to have evolved because they aided co-operation among our early ancestors who benefited from living in groups. With no one to mediate our feelings or to determine their appropriateness, the sense of self becomes distorted and the sense of reality disintegrates (source: BBC Future).

Reference
- Haney, Crime &amp; Delinquency (2003); 49(1): 124-56