It has to do in part with ancient Jewish kingdoms, which operated much differently than medieval ones.
First of all, the Catechism states that “the Immaculate Virgin, preserved free from all stain of original sin, when the course of her earthly life was finished, was taken up body and soul into heavenly glory, and exalted by the Lord as Queen over all things, so that she might be the more fully conformed to her Son, the Lord of lords and conqueror of sin and death” (CCC 966).
Thus Mary is recognized as the Queen of heaven and earth, and a feast day on August 22 is dedicated to the queenship of Mary.
Beyond that, however, Mary is called a queen because of an ancient tradition that dates back to the time of King David. According to theologian Colin B. Donovan, “In the Old Testament monarchy the Queen of the Davidic Kingdom was the Queen Mother. The Kings, for reasons of state and human weakness, had many wives, none of whom fittingly could be called Queen. That honor was reserved for the mother of the King, whose authority far surpassed the many ‘queens’ married to the king. We see this is the role Bathsheba played with respect to King Solomon and the occasions when the Queen Mother acted as regent on behalf of juvenile successors to the throne.”
There are references to the queen mother in the Old Testament, for example in the Second Book of Kings, “Then King Jehoiakim, along with his advisers, nobles, and officials, and the queen mother, surrendered to the Babylonians” (2 Kings 24:12).
The queen mother in the Davidic Kingdom would hear the pleas of the people and bring them to the king for consideration.
Is this not exactly what the Virgin Mary does, as Queen of Heaven and Earth?
For these reasons the Church has always seen Mary as a queen seated next to her Son in Heaven. Throughout the centuries Christian art has highlighted this belief by putting a crown on her head both in Eastern iconography and in traditional Western art. There also developed over the years a tradition during the month of May to crown Mary with a wreath of flowers. This is often done by First Communicants in many parishes and honors Mary throughout the month as our beloved Queen Mother.
The Regina Caeli (Queen of Heaven) is a traditional prayer that is prayed by the Church especially during the Easter season. Here is the beautiful text of the Regina Caeli, which recalls Mary’s queenship and asks for her powerful intercession.
V. Queen of Heaven, rejoice, alleluia.
R. For He whom you did merit to bear, alleluia.
V. Has risen, as he said, alleluia.
R. Pray for us to God, alleluia.
V. Rejoice and be glad, O Virgin Mary, alleluia.
R. For the Lord has truly risen, alleluia.
Let us pray. O God, who gave joy to the world through the resurrection of Thy Son, our Lord Jesus Christ, grant we beseech Thee, that through the intercession of the Virgin Mary, His Mother, we may obtain the joys of everlasting life. Through the same Christ our Lord. Amen.