Roman Catholicism says the Blessed Eucharist or the Mass is an act of worship wherein the bread and wine are turned by the priest, who uses the power of God, into the body and blood of Jesus Christ who is true God and true man.
The Christians forbid notorious sinners to come to the Lord’s Table for Holy Communion. They are barred. And the Church bars them as in asks them to bar themselves.
For Catholics the notorious sinners are:
People who live together in a state of fornication - whether gay or straight - are barred.
People who divorce their spouses and remarry other people.
Those Catholics who have married outside the Church say in register office or in a Mosque or in a same-sex marriage.
Heretics who are not ashamed to let the world know what they are.
Pro-choice politicians and activists.
LGBT activists.
Priests who left the ministry without permission.
Protestants - barred principally for disagreeing with the Church though they are considered to belong to the Catholic Church in the sense that their baptism gave them Church membership.

And many more.

Those who have some illness that prevents them receiving reverently are denied communion.  Nobody cares that the person could be too sick to understand and dies feeling rejected.

If you have some reason why you committed any of the above sins without full consent you are regarded as fit for going to communion but are warned to stay away even then to avoid giving the impression that the Church is blessing your sin by giving communion.

The Bible has Paul saying that whoever eats the bread and drinks the cup without recognising the body and blood of the Lord eats and drinks judgement to himself or herself.  They are guilty of the body and blood of the Lord.  Patrick Madrid in Where Does it say that in the Bible? page 113 states that being guilty of the body and blood of the Lord Jesus is a polite way of saying you murdered him. The idea is that since Jesus had to die to pay for our sins then sin is always murder.
The Catholic Church tells such people that they must not come to communion. People have been turned away from the altar for selling contraceptives and for campaigning for abortion. Most priests will give communion and meet with persons later to tell them to stay in their seats from now on. Many will bluntly refuse to give communion and make a scene. As those priests tend to be bullied and severely condemned on the radio and the internet and in the papers their numbers are diminishing. They only let notorious sinners have communion because they are afraid to refuse and not because they think they should.
The Church says that public sinners must be refused communion. It is referring to cases where the person only or mainly takes communion to set an example for others. It abets scandal or bad or sinful example. A public sinner is a person whose sin is quite public and made clearly and well known. For example, if a person tells the priest just before Mass that she is living in a sexual relationship and doesn't believe in marriage and he knows her sin is public he is obligated to refuse her communion.
An example of public sinners would be LGBT activists who go to communion to encourage people to scoff at and disobey Church teaching against LGBT activism and gay rights.
The Church is clear that when it won’t make a scene that scandalises the people, that communion must not be given to people with whom she finds major faults. The scandal of refusing can be avoided by the priest explaining beforehand, "The rights of the Church to believe and decree what it wants must be respected - even an atheist must accept that and respect that. We believe that the Church believes and decrees what God wants. That is why it is to be called the Holy Catholic Apostolic Church. It is not fair for notorious sinners to come to the altar for communion to get the priests and congregation to contradict what they believe and are obligated to believe as Catholics. It is not fair on the God of love who must be put first in all things. And it is not respectful to the Catholic faith. The notorious sinners are taking advantage of the fact that priests who kindly ask them to refrain from communion are afraid to do so. They are taking advantage of the fact the Catholics who have little or no loyalty to God's teaching and commands will praise their behaviour. They take advantage of the loss of the sense of sin that is in the modern world. The notorious sinners encourage others by their example to emulate them. Even murderous dictators think they should get communion. That is what that attitude leads to."
According to Catholic and Christian doctrine: “To consume Holy Communion in a state of grave sin is a sacrilege and another grave sin. It is receiving Jesus into a pit of abominations.” Hence, if a priest knows that a person is a grave sinner and gives them communion he is desecrating the body of Jesus. He is being a partner in the crime of sacrilege.
Many Catholics think that somebody living a lifestyle forbidden by the Christian faith - eg an abortionist or a person living in sin with another - may not understand the wrongness of what they do and thus are not really serious sinners. They do grave evil but in their hearts they don't mean to be very bad.
So the person could be given communion on the basis that they might not intend to be grave sinners. The priest could assume that for he has no way of knowing if they mean to do great evil.
Some Catholics argue that though the priest does not know all the circumstances and judges nobody, there is a probability that, say, a cohabiting homosexual, is in a state of grave sin which means he can’t give communion just in case. 
So you cannot judge for sure the heart of somebody who comes for communion. They might have been heartily anti-god five minutes before but it could be different now. So is it wiser to assume that they have changed or that they are seriously opposed to God and will pay for it in Hell forever if they die. No. Worse happens if you accept them as forgiven and you are wrong. It being complicit in their rebellion. And accepting a person in case they are holy is not accepting them at all. How people who live in a state of rebellion to the Church can happily go and seek and embrace this conditional and pretended acceptance is mind-boggling.
Some may say we must assume the best to be on the safe side. We must assume the person is holy despite outward appearances. They would see the ban on the homosexual as based on cynicism. But in certain cases the priest will have a good idea of what is going on. If he sees two gays having sex and then coming up for communion twenty minutes later then he can refuse. Also, if we assume people are always good where do we draw the line? Do we pretend that the murderer is really a good person but was just misguided?

But suppose it is right to keep the body of Christ away from some people. Are the reasons the Church gives for not doing this all the time valid?
If the Church gives communion to people she disapproves of would she be giving the message that she approves? Would it be making others feel better about sinning seriously or that this or that is not a serous sin at all? It would be but it is up to the Church to instruct them properly. She has no right to argue that she must refuse communion in case it leads people astray.
The priests cannot argue that they have to give communion in case the congregation are upset and alienated if they don’t. The Christian is supposed to do right regardless of how others feel so the negative reaction of the congregation is irrelevant.
What if a person is convinced the Church is wrong to think they are guilty of mortal sin? Should the person be allowed to attend communion? Then the person is not treating the Church and its law with dignity and respect. Like it or not, to treat it like that is a denial that it has the right to make rules and demand that they be kept. Its a statement against religious freedom - except maybe your own!
The Church says that a priest must refuse communion to a public sinner to protect the Eucharist and to save the community from scandal. When a priest must refuse communion to a public sinner, this is done not so much for the protection of the Eucharist from sacrilege, nor even for the spiritual benefit of the sinner, but rather for the sake of the Catholic community.
It allows communion to be given to people who are known to be sinners on the presumption that they may have repented from their sins. But if the communicants indicate that they have not repented they can be refused.
The following can happen if a priest refuses to give communion:
A person who is sinful is treated as they deserve.
Or a person who has repented and turned to God is being refused.
The Church prefers to err on the side of caution and give communion in case the person has repented. It sees refusing the Eucharist to such a person deliberately as far worse than the sacrilege of taking communion in sin.
If you are a grave sinner, the sin of taking communion when you are unrepentant is a far worse sin than your initial grave sin. The Church says you are lying to Jesus in the Eucharist and committing grave sacrilege.
It is said that priests must not reveal hidden sins through the denial of communion to the communicant. But all he is revealing is that some major rule has been broken. He is not revealing what the sin is.
If there is upset the communicant has caused it.

If a non-public serious sinner did present themselves for communion, the priest would be under at least a moral obligation to counsel him or her privately afterwards, if possible, to prevent a repetition of the offence. The obligation would be stronger if it is a public sinner.
The Bible directs that sinners are not allowed to take communion and that those who do, eat and drink condemnation to themselves for they are profaning the Lord’s body and blood (1 Corinthians 11). It does God no harm to let them eat him. If you take the sacrament of confirmation in a state of serious sin it will not affect you and the grace it gives will not be conferred until you repent. It should be the same with the Eucharist. To bar anybody from communion is wrong. The Catholic Church has no right to call itself Catholic and the true Catholic Church for it is not catholic, that is universal, that is for all people.
Matthew 26 indicates that Judas received bread and wine at the last supper. Lukesays that after Jesus said the cup was his blood and invited all to partake he said  yet behold, the hand that betrayeth me is with me on the table. (Luke 21:21). So Judas was there and may have got communion. Jesus certainly invited him to take it but if he did is not known.
The Bible mentions Judas being given some bread by Jesus and told to go and betray him - this could be communion assuming that the last supper really was a communion service.
The 1917 Canon Law decreed,

Can 855 §1. Arcendi sunt ab Eucharistia publice indigni, quales sunt excommunicati, interdicti manifestoque infames, nisi de eorum poenitentia et emendatione constet et publico scandalo prius satisfecerint.
§2. Occultos vero peccatores, si occulte petant et eos non emendatos agnoverit, minister repellat; non autem, si publice petant et sine scandalo ipsos praeterire nequeat.

§2 But the minister bars occult sinners, if they seek [the sacrament] secretly and he does not know them to be amended; but not if they publicly seek it and he cannot pass over them without scandal.
So even secret sinners were refused communion even if they look for it in private. This law clearly was about protecting the Eucharist from defilement. It would be bizarre to argue that taking communion in a state of sin and estrangement from God is not as much sacrilege as giving others a bad example. In a sense, if they let themselves be inspired by your example that is their concern. 

Today's Canon Law decrees, Any baptized person not prohibited by law can and must be admitted to holy communion - Canon 912. This forbids Protestants and public sinners from communion.

In Catholicism, the priest has to intend to turn every wafer on the altar into God. It is sinful for a mortal sinner to eat any of the transformed wafers. The church should tell the priest not to intend to consecrate wafers that will end up going down the throats of mortal sinners but does not. Then she blames only the mortal sinner for desecrating the body of God as if her negligence and insistence that the priest must consecrate all the wafers, had nothing to do with it. Even if the wafer is not God the intention to trample on God is still there but the Church says it is bad enough to stay in sin and have this intention but worse to partake of the Lord’s Table.
If you receive the Eucharist or absolution in sin it is declared by the Church that you never get the grace even if you repent later. But you should if you would with any of the rest. To receive the sacrament in sin should not be the sin of trampling on grace for you can’t get any anyway but merely the sin of mocking a sacred symbol if it should be sinful at all. It should not be a sin in these ways at all if the intention you have is that the grace will be given to you when you turn to God. It would be better than nothing. And also, not going to communion because you want a sin to remain on your soul would be mocking it anyway.
The Church says that the Eucharist gives you the spiritual food that lasts forever. Jesus spoke of the bread that nourishes you for eternity. If that is true, then if you resist the graces when you take communion you should get the graces when you open yourself up to them. Catholic teaching denies that anybody anywhere has full access to God and his graces and gifts. That in itself makes it idolatrous.
It is evil to tell anyone, “You can’t receive our Lord so go away.”
Asking sinners to stay way from communion unless they repent and get God's pardon is a very judgmental attitude. Some people who live in a state of “sin” cannot be guilty of serious sin for they are too weak to stop. The Church is wrong to judge them. The unfairness of the whole thing is more than plain when it is seen that the Church teaches that it is wrong to judge. To do it herself is to sanction hypocrisy and hypocrisy is a very nasty insult against people who do judge and those who need to do it but are told not to. The priest who obeys the Vatican and withholds communion is a hypocrite. It is up to each person to examine themselves.
The Church says it can ban divorcees and homosexuals from communion not necessarily because it judges them but because it judges their lifestyle as unchristian or harmful and wants them to think about what they are doing and fix it and not give example to others to live the same way. You can judge a person as doing wrong without accusing that person of sin for the person could be mistaken. If people cannot accept this treatment then it is clear that they don’t care if they are right or wrong and/or want the Church to change what it believes just for them. But many beliefs cannot be changed without the Church ceasing to be the Church.

Perhaps it is wrong to refuse a sinner for it will hurt them and make them despise the Church. The sinner should not be resentful for they deserve it. The sinner should not have approached the altar. God can prevent the pain and the hatred and if they happen it is the sinner’s fault or God’s will that they feel this way. The Bible says that faith is a gift from God and that he has saved the lowest sinners by faith. This approach forbids attempts to argue the person into faith. It does not saying giving reasons to believe is wrong only that there will be no faith unless God gives it. The doctrine of faith being a supernatural gift rejects the notion that you really can put a person off faith in God. If God helps them to believe and exercise faith, their anger at you for refusing them communion will make no difference.
If there is no excuse for sending anybody who is in a grave state of sin away from the altar without communion then that says things about the Pope and the Vatican who command that that be done. The Holy Spirit if good is not inspiring the Vatican’s attitude. The pope and his men know fine well that they are being unjust for they are told often enough by progressive Catholics. 
Religion should not be taken seriously enough for anybody to even consider banning people from communion.
It is vindictive to condemn on religious grounds. We know that no truly good person condemns another say for not saying some kind of prayer or for not believing something in a holy book. The Eucharist is nasty balderdash.
The more people banned from Catholic communion the better!

Apologetics and Catholic Doctrine, Book 2, Most Rev M Sheehan DD, MH Gill & Son, Dublin, 1954
Apologetics for the Pulpit, Aloysius Roche, Burns Oates & Washbourne Ltd, London, 1950
Born-Again Catholics and the Mass, William C Standridge Independent Faith Mission, North Carolina, 1980
Catholicism and Fundamentalism, Karl Keating, Ignatius Press, San Francisco, 1988
Confession of a Roman Catholic, Paul Whitcomb, TAN, Illinois, 1985
Critiques of God, Edited by Peter A Angeles (Religion and Reason Section), Prometheus Books, New York, 1995
Documents of the Christian Church, edited by Henry Bettenson, Oxford University Press, Oxford, 1979
Eucharist, Centre of Christian Life, Rod Kissinger SJ, Liguori Publications, Missouri, 1970
Fifty Years in the Church of Rome, Fr Charles Chiniquy, Chick Publications, Chino, 1985
Is Jesus Really Present in the Eucharist? Michael Evans, Catholic Truth Society, London, 1986
Handbook to the Controversy with Rome, Vol 2, Karl Von Hase MD, The Religious Tract Society, London, 1906
Living in Christ, A Dreze SJ, Geoffrey Chapman, London-Melbourne, 1969
Martin Luther, Richard Marius, Belknap Press of Harvard University Press, Cambridge, Massachusetts, 1999
Radio Replies, Vol 2, Frs Rumble and Carty, Radio Replies Press, St Paul, Minnesota, 1940
Roman Catholic Claims, Charles Gore, MA, Longmans, Green & Co, London, 1894
Salvation, The Bible and Roman Catholicism, William Webster, Banner of Truth, Edinburgh, 1990
Secrets of Romanism, Joseph Zaccello, Loizeaux Brothers, New Jersey, 1984
The Catechism of the Catholic Church, Veritas, Dublin, 1995
The Early Church, Henry Chadwick, Pelican, Middlesex, 1987
The Mass, Sacrifice and Sacrament, William F Dunphy, CSSR, Liguori Publications, Missouri, 1986
The Primitive Faith and Roman Catholic Developments, Rev John A Gregg, APCK, Dublin, 1928
The Student’s Catholic Doctrine, Rev Charles Hart BA, Burns & Oates, London, 1961
This is My Body, This is My Blood, Bob and Penny Lord, Journeys of Faith, California, 1986
Why Does God…? Domenico Grasso SJ, St Pauls, Bucks, 1970
The Web
Transubstantiation, Is it a True Doctrine?  
The Amplified Bible