Prisons, according to The Zombie Survival Guide: Complete Protection From the Living Dead, are excellent places to barricade yourself in. Already built like a fortress, with fences and strong, stone walls around the entire compound, sniper towers, an infirmary, an armory, a well stocked kitchen meant to feed an entire prison worth of criminals, and a series of mazes and steel doors that you can fall back to in case the zombies manage to get past your defenses, all make it a prime choice. However, be wary of remaining prisoners in the complex, or other survivors.
There are two problems when you hole up in a prison: First, it will literally become your own prison (though this is always the case when you barricade yourself somewhere), and the fact that it may still house criminals when you first barricade yourself in there (let's face it, the government is not going to release the inmates, even if they'll starve). If this is the case, you have three options: Release them, and have extra defenders under the new threat that they may result to their old ways; keep them in their cells and still feed them, which loses you supplies and only gains you a clear conscious, or kill them by shooting them or just leaving them in their cells and let them starve, which loses you extra defenders, but also the task of disposing their bodies (so they don't rot and become disease and bacteria breeders).
The cells pose an interesting line of defense. In case the prison becomes completely overrun, you should have several cells filled with supplies ahead of time, that way you and the survivors can stay away out of the reach of the zombies while shooting them. They can also used to store individual zombies to be studied, since knowledge will always be man's greatest weapon. Or, if any survivors or criminals get out of hand, you can always use the cells for what they were designed for; keeping rampant people who can get others killed where they can't do harm. Entire cell blocks can be sealed off, and as long as the zombies don't have multiple entry points around the complex, you can easily quarantine whole sections off. However, make sure you don't become locked in your own cell, unless you can get it open which is unlikely you will be stuck.
Older prisons offer better defense newer ones, due to the fact that more recently built prisons rely mainly on electrified fences, razor wire, and sniper towers to prevent inmates from escaping. While this may work well when only halting a few dozen zombies, a few hundred will easily topple the chain link fences in no time. The solid stone walls of older prisons provide a far better physical barrier against huge swarms of the living dead, provided they have regular maintenance.
Most prisons have rehabilitation programs, and as such most prisons will have libraries full of books on practical and technical skills, such as machining, carpentry and agriculture, which you are going to need for a prolonged siege and in the aftermath.
Morale is a problem that you are going to have to find a creative solution to. While this is the case with most bases, it applies even more so to prisons, since they are depressing environments designed specifically to break a man's spirit and hopefully deter them from future crimes once their sentence is over (that, and it's cheaper than actually providing decorations). This means you'll have to find ways to keep yourself and the other survivors entertained and distracted from the fact that they're essentially in jail. Use movies, books, any entertainment you can find, even organize talent shows if possible, no matter how bad the acts are, anything at all to keep yourselves from going insane.
Prisons nowadays only contain non-lethal equipment and riot gear to prevent convicts from obtaining lethal weapons and to subdue riots without death. Obtaining your own firearms is a must.
Prisons are an ideal place to hide if you can keep it functioning.