The credit rating increases when you successfully make automatic daily interest payments while you have an active loan, so I guess if you lack sufficient funds for that it'll go down.
You could sell shares (Valuation menu) for a quick cash injection but this is only a short-term solution if your prison is running at a loss (red negative cashflow). The Finance menu (accountant required) details the things that can be changed to reduce your expenses and increase your income to improve your overall cashflow.
You can reduce your running costs by firing staff, reducing the variety/quantity of meals and cancelling programmes. If you have enough money you can also research Tax Relief and Offshore Tax Haven to reduce your corporation taxes.
You get a prisoner grant of $150/day per prisoner so taking new inmates will increase this plus you'll get the one-off intake payments of up to $2500 per person. Adding a forestry zone (gardeners and workmen required) has initial start-up costs but will then provide a handy source of income, especially if the wood is processed in a workshop to make planks or beds. Running the prison without any problems will give a bonus of up to $1000/day (with 200+ inmates) for each consecutive day without incidents.
Of course adding prisoners (especially if you don't have enough cells and other facilities), reducing staffing and serving poor meals will have other consequences too...!