For my eyes have seen Your salvation.
You have prepared it
in the presence of all peoples—
a light for revelation to the Gentiles
and glory to Your people Israel. (full text here)
At the end of eight days, Jesus was circumcised and formally given a name. Thirty-three days later, his parents then took him to the temple to present him to the Lord, offer a sacrifice to redeem their firstborn (Ex. 42:20), and purify Mary from her postnatal bleeding as well as Joseph from any contact he had with her (Leviticus 12). From the beginning Jesus was brought up according to Jewish law, raised by righteous and devout parents. Luke repeatedely emphasizes that Jesus followed the Law. Writing to Theophilis and the Greek community, he may have been intentionally pointing out that Christianity was no religion built by rabble rousers, despite the uproar caused by the spread of the faith in the book of Acts.
At the temple the family was approached by Simeon. He was righteous and devout, closely in tune with the directing of the Holy Spirit, and looking with eagerness toward the hope of the prophets. The birth of Jesus closes out the era of the law and prophets, but they are being fulfilled rather than abolished by Jesus. The old was passing away; behold the new had come.
Most of what Simeon says about Jesus is an application to the child of prophesies from Isaiah such as Isaiah 52:10, "The LORD has bared His holy arm in the sight of all the nations, that all the ends of the earth may see The salvation of our God." Many Israelites would fall and rise before Jesus, but in faith rather than a sword. Some would never rise, but the true hearts and minds of the people would become clear. Those with and without faith would clearly be distinguished. Also, as you can read in the book of Acts, God's plan is to bring the light of salvation to the Gentiles through Israel's rejection. The persecution of the early believers is the main force that causes the faith to be preached among the nations.
How did Simeon end up at the temple at the perfect time? He was "looking for the consolation of Israel." He had been promised by the Holy Spirit that he would live to see the Messiah. Simeon was attuned to spiritual things and was there to welcome the newborn Savior. Even today God prepares us to receive Christ by stirring up a longing for consolation and redemption. May those who do not know him be filled with a longing from the Spirit to find true peace, and may those of us who know him long for the second coming, a time when all will be redeemed once and for all.
Therefore, with your minds ready for action, keep a clear head and set your hope completely on the grace to be brought to you at the revelation of Jesus Christ. - 1 Peter 1:13