What happened in Mary's life to shape her into being the person she was? How do we know that Mary was so holy? How do we know that she was able to present herself as worthy of being the Theotokos, the God bearer?
Simple answer is: we do not.
We do know from Scripture that she "had found favor with God" (Luke 1:30b), a powerful statement to her disposition.
Most of our traditions of Mary's early life come to us from stories in sources like the apocryphal Proto-gospel of James. There the story goes that her parents, Anne and Joachim, we so excited to have the blessing of a child in their old age that they gave (presented) her to the Temple where she subsequently lived, studied, and grew in holiness until such an age that she was presented in marriage to Joseph.
What we are probably celebrating today is the dedication of a Marian church that was located on the Temple Mount in Jerusalem but subsequently destroyed.
Let us present ourselves to the Lord in His temple and be ourselves dedicated to service, consecrated to God, able to present ourselves as worthy of being God bearers to the world. Mary help us to find favor with God as well.
My soul proclaims the greatness of the Lord, my spirit rejoices in God my savior, for He has looked with favor on His lowly servant. From this day all generations will call me blessed: the Almighty has done great things for me, and holy is His Name. He has mercy on those who fear Him in every generation. He has shown the strength of His arm, He has scattered the proud in their conceit. He has cast down the mighty from their thrones and has lifted up the lowly. He has filled the hungry with good things, and the rich He has sent away empty. He has come to the help of His servant Israel, for He has remembered His promise of mercy, the promise He made to our fathers, to Abraham and His children for ever.