If a man or woman divorces their spouse, would that be a sufficient reason to excommunicate them from the church according to any Christian groups? Does the fact of whether or not they remarry, or whether or not they repent, make a difference regarding excommunication?
I can't speak for every Christian denomination, but in general, the answer to your first question is no. The answer to your second question is yes, with some qualifications.
My denomination is the Presbyterian Church in America (PCA), and the following is a summary of this resource: Report of the Ad-Interim Committee on Divorce and Remarriage to the Twentieth General Assembly.
The reason divorce itself is not a sufficient reason for excommunication is that scripture allows for divorce in some instances. So church leadership must first determine whether the desired divorce would be valid (scriptural). If the reason for divorce is found to be valid, then it may be allowed and not result in church discipline.
If it is found not to be valid, and the church member continues to want a divorce, then church discipline ensues. If during the process of formal church discipline, the person demonstrates repentance by pursuing reconciliation with the spouse, then church discipline may end. If the person continues in the sin of desiring a non-scriptural divorce and follows through, they have broken their membership vows to the church and are demonstrating continued unfaithfulness to Christ, and are therefore subject to excommunication. This would result in the church treating this person as a non-Christian and pursuing them accordingly.
So repentance does make a difference. Re-marriage would most likely be determined on the validity of the divorce.