While many lawsuits filed on behalf of prisoners are frivolous or desperate, I can think of no other more effective way to assure prisoners their constitutional rights. Since we are talking about a population that is very easily disregarded by society and therefore by politicians, the courts are the last line of defense in offering those same prisoners some protection from abuse and excess in their punishments. Ironic, since the same legal system sentenced them to prison in the first place.
As to whether or not courts have gone too far or not far enough, I do not believe there is a simple, one-size-fits-all answer. Some judges seem to have gone too far in my opinion at time. On the other hand, some have not gone far enough. On the whole, the justice system seems pretty responsive to prisoner rights overall. A prisoner may well disagree with me on that score.
One area that seems chronically unaddressed is violence in prisons. It is a well known fact that prisons are very physically dangerous places to be locked up in, and a person who is someday released may well have been subjected to some pretty horrific violence during their time there. Is a person who is sentenced to five years in prison for drug possession, for example, also sentenced to endure violent attacks? I would think that would be unconstitutional, and the government, to me, should do more to stop such violence.