The stars find their source in the vision of John in the book of Revelation.
There John tells us,
A great portent appeared in heaven:
a woman clothed with the sun, with the moon under her feet, and on her head a crown of twelve stars.
She was pregnant and was crying out in birth pangs, in the agony of giving birth.
(Revelation 12:l-2)
Later in that chapter John relates that this woman gives birth to a son destined to rule all the nations and the son is caught up to God and his throne.
The woman is at enmity with and pursued by a huge red dragon who, we are told, is Satan or the devil.
While the woman flees to a safe place in the desert prepared for her by God, the dragon and its angels wage war against Michael and his angels in heaven.
Cast down to earth, the dragon, called the ancient serpent, pursues the woman, who escapes him.
So he wages war against her offspring.
As you can see, this vision is filled with symbols.
It appears that John intended his readers to see in the woman clothed with the sun the people of Israel or the new people of God.
The twelve stars are one indication of that.
They can be taken as representing the twelve constellations of the zodiac.
But they can also be seen as symbols of the twelve tribes of Israel and the twelve apostles.
At least on a second level, or in an applied sense, Christians have also seen our Blessed Lady in the woman of Revelation.
The reason should be evident.
The woman finds herself in a struggle with Satan.
Satan is defeated by the blood of the Lamb the son to whom she gives birth.
The woman in Revelation certainly recalls the words of God speaking to the serpent in Genesis:
I will put enmity between you and the woman, and between your offspring and hers;
he will strike your head, and you will strike his heel. (3:15)
Christians have also long seen Mary in this woman in Genesis.
As a result Mary is often spoken of as the
“woman clothed with the sun”.
Artists or sculptors depict her crushing the head of a serpent and standing on the moon with her head surrounded by or crowned by stars.