Next, he strengthens what he had said with a metaphor when he then says, "Behold! Even the moon does not shine, and the stars are not pure in his sight." Here consider that he does not mention the sun because it is not evident to the senses that its light is obscured in the presence of a brighter light. But the moon and the stars are darkened even in the presence of the corporeal light of the sun, and so their brightness seems even more like darkness, compared to the immensity of divine light. From this he concludes his proposition, "how much more is man corruption and the son of man a worm," ...for he cannot be reckoned shining with the splendor of justice if compared to the divine justice, nor clean in innocence if compared to divine purity. He expressly compares that man to corruption as consisting in matter which is close to corruption, and the son of man to a worm which is generated from putrefacation. He wants to show in this that man cannot propose his own justice and innocence, however great it may be, as it is reckoned as nothing in comparison to God, when divine justice is in question.
Source: Commentary on Job