It is essential to understand the symbolic and metaphorical elements of God's prophesy language. He has a pattern that He used when speaking in prophesy, and it is all defined in the OT.
"Earth" - the land or region, nation or country a prophet was sent to warn as in Isa. 1:2 ..." Hear, O heavens, and give ear, O earth: ..." Isaiah was speaking to the people of Judah and Jerusalem (Isa. 1:1), and he called two groups of people - their heavens and their earth. The people of the "earth" were those of the land or nation of Judah and of the city Jerusalem. So in prophesy "earth" is the land the prophet was specifically sent to warn. We have to identify which people, and which land the prophet was sent to.
Most of the time the OT prophetic "earth" was Israel / Judea, but not always. Isa. 13:13 the "earth" was the nation of Babylon. We have to identify which nation the prophet was speaking to.
"Heavens" - the ruling authority, or king and his officers / agents that ruled over the land / nation the prophet was sent to warn. They occupied a higher place, held a higher station with power and authority over the people. They were a small type of God's heaven, a small type of God's rule and authority over all the earth, in that they held dominion and authority over part of the land.
"They come from a far country, from the end of heaven, even the Lord, and the weapons of his indignation, to destroy the whole land." (Isa. 13:5, KJV)
The prophesy against Babylon was that another king and another people from the "end of heaven", that is beyond the borders of Babylon would come against them to destroy the "whole land" of Babylon.
The "sun" referred to the highest ruling authority of that land which was under judgment, and therefore was the king of that nation. The "moon" was the queen / or next ruling authority beneath the king, and the "stars" were the princes or governors of that land. The pattern was set and defined in Joseph's dream in Gen. 37:9-10.
"9 And he dreamed yet another dream, and told it his brethren, and said, Behold, I have dreamed a dream more; and, behold, the sun and the moon and the eleven stars made obeisance to me.
10 And he told it to his father, and to his brethren: and his father rebuked him, and said unto him, What is this dream that thou hast dreamed? Shall I and thy mother and thy brethren indeed come to bow down ourselves to thee to the earth?" (KJV)
Most often in the OT the "stars of heaven" referred to the children of Israel as the promise to Abraham described his descendants - Gen. 26:4; Ex. 32:13; Deu. 1:10; 10:22, etc. But, sometimes the prophet would assign that metaphor to the princes of other nations as in Isa. 13:10.
So, when prophetic language speaks of the sun not giving its light, or the moon no longer shining then the King / Queen, or the highest ruler and next highest ruler of that nation / land was going to be removed from power and thrown out.
The stars "falling from heaven" meant that the children of Israel - or princes of another nation - would be removed from their station of authority. Specifically when applied to Israel or Judah, the princes were the priests who ruled the temple under the authority of the King.
All of this language was speaking about the overturning of political authority which God ultimately determines.
"18 Then will I stablish the throne of thy kingdom, according as I have covenanted with David thy father, saying, There shall not fail thee a man to be ruler in Israel.
19 But if ye turn away, and forsake my statutes and my commandments, which I have set before you, and shall go and serve other gods, and worship them;
20 Then will I pluck them up by the roots out of my land which I have given them; and this house, which I have sanctified for my name, will I cast out of my sight, and will make it to be a proverb and a byword among all nations." (2 Chron. 7:18-20, KJV)
So anytime the scriptures begin speaking a prophesy we have to watch for the symbolic language of overthrowing nations and their ruling authority. These elements repeat from prophesy to prophesy. And as the book of Revelation is a prophetic book, then we must surely look for those same prophetic symbols.
Which "heaven" then is meant in Rev. 12:1-2? It sets the context of the entire chapter.
"And there appeared a great wonder in heaven; a woman clothed with the sun, and the moon under her feet, and upon her head a crown of twelve stars:
2 And she being with child cried, travailing in birth, and pained to be delivered." (KJV)
It speaks first and foremost of the birth of Christ, the Messiah. In which land or nation was Jesus born? Under whose ruling authority was Jesus born? There are two answers here: 1) He was born in Bethlehem, a city of Judea, when Herod was king over the land of Judea (Matt. 2:1); and 2) at that time Judea was a province under Roman rule.
So, there were two ruling authorities over the people of Judea - King Herod and Caesar. The symbolic "heavens" of this prophesy concern either Judea's ruling authorities and/or the Roman emperor. Context will govern which "heaven" is being spoken of. In chap. 12 as it clearly refers to the birth of Christ, the closest "heaven" would be Judea, and the Sanhedrin council.
The "earth" therefore of this prophesy speaks of Judea and Jerusalem, just as it did in Isa. 1:2, and in Ezek. 9:9, and many others.
As this chapter opens with the look back or flash back to the birth of Christ, and the double vision of the birth of Christ's church or "ecclesia" on the day of Pentecost, then the time frame of this chapter is also set as the first century AD. It is not a future prophesy for us. Christ was showing John something that had already happened, and something that was about to happen.
"The Revelation of Jesus Christ, which God gave unto him, to shew unto his servants things which must shortly come to pass; ..." (Rev. 1:1, KJV).
"Shortly" did not mean 2,000 years later. (1)
The dragon is a symbol for an adversary of God and is used in prophesy for the idolatrous nations that stand against Him. The word “dragon” is drakon in the Greek, and means a huge serpent. It only appears in Revelation. In the OT, it is the serpent in Ex. 7:9-10; the representation of Nebuchadnezzar as a dragon in Jer. 51:34; the representation of the idolatrous tribes of Israel in Deu. 32:33; the representation of Babylon in Isa. 27:1; 51:9; and the representation of Pharaoh, king of Egypt in Ez. 29:3.
The symbolic use of “dragons” and “serpents” meant the pagan, heathen nations who worshiped and sacrificed to idols, the unclean things they made with their own hands. Those pagan, idolatrous nations were always the enemies of the Most High.
So, this dragon / adversary of Rev. ch. 12 was the one with 7 heads and 10 horns, the same "beast" as from Dan. chap. 7:19-20; that 4th kingdom that would be in power when Christ was born, and when Christ was crucified - Rome.
Rome was the sea "beast" identified in Rev. 13:1-5, with the same 7 heads and 10 horns. Rev. 12:4 refers to the dragon (Caesar of Rome) drawing his tail and throwing down a third of the "stars of heaven"; which referred to the pulling down the priests of the temple in Jerusalem, and destroying part of the descendants of Abraham - the Jews.
The woman fleeing into the wilderness was Mary fleeing with the baby Jesus to Egypt to escape Herod's decree to kill the children (Matt. 2:16), but mostly of the collective assemblies (the church) whom Chirst warned to flee to the mountains when they saw the Roman armies gather against Jerusalem (Luke 21:20-21; Matt. 24:15-16).
"And there was war in heaven: Michael and his angels fought against the dragon; and the dragon fought and his angels,
8 And prevailed not; neither was their place found any more in heaven." (KJV)
There was no war in the highest heaven where God sits on His throne above the entire earth. This prophetic language refers to the same "heaven" and "earth" of this prophesy - namely the ruling authority of the kings, both Herod and Caesar over their "earth" or land of their kingdom... the province of Judea under Roman rule.
Angels are agents of God, messengers of God. They refer to both the heavenly, celestial messengers (Psa. 103:20), and to human messengers (Mal. 3:1). The context tells us which are which. In Rev. 12:7 the dragon is the adversary of Christ, and his angels / agents / messengers would be those of Caesar and of the Sanhedrin who worked with Caesar for a time to persecute the saints of Christ's church.
Michael was the OT prefigured Christ, the Angel of the Lord. Michael was Daniel's prince (Dan. 10:21); the great prince which stood for Daniel's people (Dan. 12:1). Christ is the prince of the covenant (Dan. 11:22), and the prince of princes (Dan. 8:25), the Messiah and the Prince (Dan. 9:25). (2) (3)
So, Michael of Rev. 12 was the pre-figured Christ of the OT, the prince of the host (Dan. 8:11). He is still the warrior for His people in Revelation. His angels / messengers included both heavenly, celestial beings and His apostles and disciples who were working to spread the gospel during that first century AD under Roman and Jewish persecution.
That battle occurred on the "earth" of Judea during the days of the 4th kingdom prophesied in Dan. chap 2 & chap 7, when Christ was incarnated on the "earth" in the 1st century AD. It is not speaking of any angels being thrown out of God's highest heaven, but of the power and rule of those adversaries which opposed God's Son - the rulers over the "earth" of Judea - the Jews of the Pharisees and Sadducees who were removed from their rule and authority -their "heaven" of the Jewish temple.
The time of this prophesy was the first century AD. The book opens with the flash back to the birth of Christ = 1st century AD. It sets the time frame for that battle between the Sanhedrin adversaries of Christ, and the saints who converted to the gospel of Christ. Chap. 12 begins the battle vision of the destruction of the temple, and the destruction of Jerusalem which ended with the seige of Jerusalem by the Romans in AD 70.
Christ and His messengers won.
The order of the events are: 1)the birth of Christ approx. 3 -2 BC.; 2) the birth of the church on Pentecost approx. 30 - 31 AD; 3) the battle of the Roman-Jewish wars approx. 66- 70 AD; and 4)the destruction of Jerusalem and the temple in Sep. 70 AD.
See "The Beast of Revelation" at my blog here.
See also "The Signs of Revelation - Part V: The Animal Symbols of the Battle" here.
And, "The Signs of Revelation - Part II: The Codes and Symbols of Nature" here.
There are many more articles on the time of Revelation at my blog ShreddingTheVeil.
1) The Time of His Coming - here
2) The Divine Christ - here
3) Michael the Archangel - here
(Bold emphasis is mine.)