To my mind, now that is a usual penance for the guilty party. If the person is not guilty in the divorce, e.g. he did not conduct adultery or other deed that caused the divorce, he is not given a penance. But anyway, that is not "automatic", not that a person divorces and stops taking Communion by himself, that should be given by a spiritual father during Confession. He may give another penance, e.g. to read Canon of Repentance for some period of time.
The origin of penance for divorce is Mathew 19:9, the Apostolic Canons (No. 48) (composed in III-IV cent.), Canons (No. 9) of St. Basil the Great (330—379) and rule No. 87 of 6th Ecumenical Council (692)
Mathew 19:9:
And I say unto you, Whosoever shall put away his wife, except it be for fornication, and shall marry another, committeth adultery: and whoso marrieth her which is put away doth commit adultery.
Canon 48: (my translation)
"If a lay person expels his wife and takes another, or takes the one expelled by another, let him be excommunicated".
Rule 87:
"A woman who has abandoned her husband is an adulteress if she has betaken herself to another man, according to sacred and divine Basil, who most excellently and aptly extracted this item of knowledge from the prophecy of Jeremiah, which says that “if a wife transfers herself to another man, she shall not return to her husband, but by polluting herself she shall remain polluted” (Jer. 3:1); and again, “Whosoever hath an adulteress (as his wife), is foolish and impious” (Prov. 18:22). If, therefore, a woman appears to have departed from her husband without a good reason, the man deserves to be pardoned, while the woman deserves a penance. The pardon shall be given to him so that he may have communion with the Church. Any husband, however, who abandons his lawful wife, and takes another, according to the Lord’s decision, is subject to the judgment attached to adultery. It has been canonically decreed by our Fathers that such men shall serve a year as weepers, two years as listeners, three years as kneelers, and during the seventh year shall stand together with the faithful, and thus be deemed worthy to partake of the prosphora if indeed they verily repent with tears".