There has been some minor consternation, about the website for my upcoming wedding. In the section about the mass, I wrote that "All Catholics who are not in mortal sin are invited to come forward to share in the Eucharist."
That's not very inclusive, but I'm not the one who came up with that rule. It's actually church law. I'm pretty sure the idea comes from the Bible, which says that whoever “eats the bread or drinks the cup of the Lord in an unworthy manner will be guilty of profaning the body and blood of the Lord” (1 Cor. 11:27). The church takes the Eucharist really, really seriously, so it tries to avoid any sacrilege or scandal with the Eucharist, wherever possible.
I checked what the US Bishops have to say on the matter. To summarize, why can't people in mortal sin participate in the Eucharist? Because they need to go to confession first. Why can't non-Catholics participate in the Eucharist? Because most of them don't believe in it, for one. For another, they're separated from "unity with the church", which the Eucharist embodies.
Now, "only Catholics not in mortal sin can participate in the Eucharist" is the church law. In practice, most churches let anyone and everyone come up for communion. It's not like the priest is going to stop you and ask to see your baptismal certificate, or question when you last went to confession. Unless he has reason to believe that you're breaking the law, he won't hassle you.