The question as to which governmental entity should run prisons can be debated, but it is clear that prisons need to be taken out of the hands of private entities. Incarceration of a country's population should not be motivated by personal wealth. Prisons are to protect the people, not pay a small portion of people for imprisoning others. State governments would make the most sense in running prisons as the burden to do so would be directly related to their respective success of law enforcement and crime rate.
The use of private prisons for profit has created a dangerous environment. Overcrowding serves to increase the profit margin of these institutions, and the overcrowding has led to an increase in violence. This environment does not promote a lowered recidivism rate, which is an important role of the prison system. Government funding and management would eliminate for-profit institutions and allow better analysis of how we can effectively lower recidivism rates.
Yes, the government should take over the funding and management of the prison system. Private companies involved in the prison system have the incentive to profit and therefore do not manage prisons and prison funds in an economical fashion. Because the government has no incentive to profit, funds will be used more prudently. The government will also be able to better ensure that prisoners are treated fairly and humanely than private prisons and private guards.
Each state has a few different laws and different law enforcement priorities. The legal system varies from state to state also. States should have the right to manage their legal systems and prisons as they see fit. The privately run prisons are proven to be more secure and cost-effective than government run prisons.