"In that day the Lord will punish the powers in the heavens above and the kings on the earth below." NIV translation
This refers to the day when the armies of the nations gather together to attack the city of Jerusalem. The Hebrew word "paqad" which means "visit" is translated as "punish" here and it speaks of the direct intervention of Jesus Christ. This is what John saw in Revelation 19, as Jesus will lead the armies of heaven against Satan, his demons, and the leaders of the armies of the earth.
"They will be herded together like prisoners bound in a dungeon; they will be shut up in prison and be punished after many days." NIV translation
The outcome of this battle is that the unholy trinity of Satan, the beast, and the false prophet are captured and imprisoned in Hell. The men that followed them are slaughtered and John describes a pretty gory picture of this in Revelation 19. The many days refers to the thousand years which is commonly called the Millennial Reign.
"The moon will be dismayed, the sun ashamed; for the Lord Almighty will reign on Mount Zion and in Jerusalem, and before its elders - with great glory." NIV translation
With the removal of the influence of Satan and his demons, the earth will be governed by Jesus and His saints. Even the light of the moon and the sun in the sky will be pale in comparison to the presence of Jesus Christ. The headquarters for this government will once again be the city of Jerusalem as John described in Revelation 20.