They're only linked insofar as they both use prisons as "weapons", i.e, undesirable places to be in.
They're linked in that "a sense of morality transcend[s] immediate self-interest and fear of punishment" [1]. Retribution links the justice system to our sense of morality. That deters crime.
The research on punitive damages tends to be more clear-headed than anything I've read on criminal law in this matter [2]. (For example, punitive damages provide "aggrieved parties with an attractive substitute for revenge.")
[1] https://www.ojp.gov/ncjrs/virtual-library/abstracts/deterren...
[2] https://uknowledge.uky.edu/cgi/viewcontent.cgi?article=1185&...