Here's a chart that compares these death rates:
This results shown on this chart immediately beg the question: Is this causation (working actually causes or enables you to live longer) or correlation (there's no direct casual relationship). Here's one possible explanation that would weigh in on the correlation side: People who are in poor health and can't work would fall into the retired group, whereas only healthy people can continue to work. But that doesn't really explain the difference, because people who were on disability benefits and whose health was compromised were excluded from both groups.
An experiment to conclusively figure out the connection would be somewhat difficult to carry out. You'd need to take a homogenous group of people and split them into two groups: one group takes cruises and plays golf--these people are effectively retired--and the other group continues to work. Then you'd have to measure their mortality rates in about 20 years. Hard to imagine this experiment ever taking place.
However, various longitudinal studies and anecdotal evidence are weighing in on the causation side. (For an excellent summary of this evidence, see George Vaillant's excellent book Aging Well). And actually, it seems that engagement with life is what helps prolong life. You can get engagement with life from working, but you can also get it from taking up causes, volunteering, hobbies, and contributing to your family and community.
Here's the takeaway for me: Finding powerful reasons for getting up in the morning in my retirement years is as important as my financial planning. My prior blog post, Can't Retire Yet?
The jury is still out on the question of whether working might increase your longevity. What's your take on this?