Until their bilirubin levels are normal. This often takes less than 24 hours, but some babies may need the light exposure for up to a week.