Bankruptcy works largely the same for people who are retired as for people who are working. Whether you are still working or already retired, your retirement savings are usually protected during bankruptcy.
If you are already retired, it can, however, make qualifying to file a Chapter 7 easier.
To be able to file for a Chapter 7 you need to pass a means test which looks at your current monthly income. Social Security income is specifically excluded from this calculation. So, if you are receiving retirement income and Social Security, only the retirement income is counted. This is beneficial because if your current monthly income is below your state’s median income you will qualify easily to file a Chapter 7 case.