Divorce, of itself, is not an obstacle to receiving the Eucharist—but mortal sin is. If a person’s divorce is an occasion of mortal sin, then he must at least be reconciled with God and the Church, ordinarily through the sacrament of confession, prior to receiving the Eucharist.
That said, divorce is not always an occasion of sin for every spouse. The Catechism of the Catholic Church notes the following:
It can happen that one of the spouses is the innocent victim of a divorce decreed by civil law; this spouse therefore has not contravened the moral law. There is a considerable difference between a spouse who has sincerely tried to be faithful to the sacrament of marriage and is unjustly abandoned, and one who through his own grave fault destroys a canonically valid marriage. (CCC 2386)