Yes, since it was their primary residence prior to renting, they can qualify for the full exclusion if they move back in for 2 years prior to selling.
This used to be true even if you bought it as a rental and then moved in before selling, but the HOUSING AND ECONOMIC RECOVERY ACT
OF 2008 amended Section 121 to disallow exclusion of gains during unqualified periods.
If it was a rental first and they moved back in, then a fractional amount of the gain would qualify for the exception, i.e. owned for 8 years, rented for 6 and lived in for 2, 25% of gain can be excluded.
When they sell, they'll still owe depreciation recapture for the period it was a rental.
Edit: I see a number of sites that claim the nonqualified use section applies if it was a rental at the onset of the 5-year look-back period, Sec 121 states:
Exceptions: The term “period of nonqualified use” does not include—
- any portion of the 5-year period described in subsection (a) which
is after the last date that such property is used as the principal
residence of the taxpayer or the taxpayer’s spouse,
I believe that wording supports my answer, but tax-code is often interpreted differently.