Why do i want my prisoners to be happy? They did ambush me after all and i think they go on a rampage if i let them out. Do they convert to my fort if i make them happy enough?
What Marthnn said. Also, you may want to read the wiki about
stuff that affects the thoughts of dwarves as well as
tantrum spirals.
Basically, if one or more of your dwarves become extremely unhappy, they can go insane and go on a rampage. They can injure or kill pets or other dwarves, destroy stuff, kill themselves, etc. And since dwarves live in a community and they usually interact with each other (socialize, make friends, get married, have children, etc.), when one dwarf or pet dies, it can affect many other dwarves. If not managed carefully, it can lead to a cascade effect or chain reaction in which most (if not all) dwarves go insane and start maiming, suiciding, and killing each other.
Although it sounds really bad, this type of situation can be called
"fun" by diehard fans.
The goal for many of us is to keep dwarves happy enough that this does not happen. And there are various strategies and techniques to do this. Of course, when a dwarf does go on a rampage, it is probably best to either imprison the poor fellow or, if it comes to it, slay him before he injures or kills any further. Yet, it is often possible for the imprisoned dwarf to be rehabilitated and returned to society as a useful member. Since killing said insane dwarf may give major negative thoughts to his/her family and/or friends, imprisonment seems preferable as it might prevent a Tantrum Spiral.
Obviously, when a dwarf is imprisoned he/she gets a major negative thought about the situation. But when he/she is finally released, they get major happy thoughts. Thing is, if the happiness level of the newly released dwarf falls too low again, they might go on another rampage. The theory is that nice furniture and stuff in the jail cell should improve the happiness level.