Upvote:7
The Catholic Encyclopedia article gives a good albeit old insight into canonical age. In those days 100 years ago and previous, confirmation was before first Communion. Nowadays in most diocese in the USA that's flipped around.
The terms, age of discretion and age of reason are used to describe what is needed for a youth to fully understand what they're doing and freely choose to do it. Why this is required for the Eucharist and Confirmation and not for Baptism is not exactly obvious, unless you consider:
A. Sts. Peter and John confirmed those who were already baptized, but didn't know much about the faith (Acts 8:14-17) - after instruction. And
B. St. Paul said it would bring condemnation on yourself if you eat the Eucharistic Sacrifice unworthily
So, a person needs to be in a state of grace to receive communion, and because they need to be in a state of grace, they need confession and because they need confession, they need to be aware of their sins and because they need to be aware of their sins they need to be at the age of reason, which the Church has fixed at around 7 years of age.