It depends upon the Church. If you believe in baptismal regeneration there may be additional concerns. But if not, I think it's a result of Paul's warning about taking communion unworthily. In some congregations this leads to checking out all guests to make sure they are in good standing. But as a minimum, it seems reasonable to say that we should only admit Christians. Baptism is a traditional way of defining who is a Christian.
Of course baptism can't tell you whether someone is actually in good standing with God. But there's no way we can do that. All we can do is check someone's visible status. And baptism is the way someone is admitted to the visible community of Christians.
For much of Church history, we could reasonably assume that most people grew up Christian, and were baptized from infancy. So it didn't exclude anyone who should have been included.
But there's another issue. Communion is a sign of the Christian community. It's not just an individual act, but an expression of our fellowship with each other as part of the one vine. I believe that in the early Church the main issue would have been catechumens, people who were under instruction but not yet members. My understanding is that they did not participate in communion. Clearly part of this is that the Church was still watching to see that their lives reflected Christ before being willing to make them formal members. So it was still not clear that they were worthy. But I think a big part of it is that they weren't part of the Church yet, and communion is an act of the Church.
Today the situation is more complex, because we have children who grew up in denominations that don't baptize infants, and we have "church shopping" and unchurched Christians.
I guess in principle I would still say that if someone isn't willing to make the public commitment of baptism, it doesn't make sense for them to participate in communion. But in the case of older children who are clearly Christian, and are participating in a Church (e.g. Sunday School or youth group) but are not yet baptized because of their parents' decision, it's not their fault, and I'd be included to make an exception.
As to someone who is the modern equivalent of a catechumen, which I think is the OP's concern, I don't feel strongly. But communion is an expression of the fellowship of the Church, not just an individual act. I don't think it's unreasonable to wait until someone is formally part of the Church before having them participate in its visible sign.