Should peer review invitations be accepted if one is unemployed?
Peer review is not a tax: if it doesn't make sense for somebody to peer review, they shouldn't do it.
Instead, I view peer review as:

an opportunity to contribute to a community that I care about, and
beneficial to me in helping me &quot;keep my tools sharp&quot; on critical thinking, writing skills (even as a reader!), and exposure to authors and ideas I might not otherwise read.

Because responsible peer review takes a significant investment of time, however, I set a budget for myself on how much time is sensible for to contribute over the course of a year, and I refuse assignments that would take me over that budget.
I would thus advise your colleague to consider a sensible budget, given their current situation and how much those motivations make sense to them. Yes, peer review may take time away from job development. On the other hand, peer review may still feel meaningful as a contribution, an intellectual connection, a motivation, etc.
Maybe the budget should be zero.  Certainly the budget shouldn't be 10+ hours per week.  But it may be entirely reasonable to put in a couple of hours of peer review per week if they still enjoy and benefit from it.
Bottom line: the amount to continue peer reviewing is an assessment that your colleague needs to make for themselves based on their personal situation and to periodically reassess as that situation evolves over time.