If you're interested in the topic of how punishment evolved to what it is now over the years you should read Discipline and Punish by Foucault.
I do not remember if he speaks specifically about solitary confinement, but he certainly talks about how imprisonment developed to the point where it is now and at the end of his book asks some very good questions.