Chapters 17 and 18 foretell God's judgments upon "Babylon." This warning comes shortly before Babylon's destruction.
When John was "carried away in spirit" in verse 3, he was taken in vision to another time and place. In Revelation 17:1 the angel invites John to "come hither" to the "judgment" of the great whore. So we can associate the time reference for this chapter with the beginning of the pre-advent judgment.
In context, the kings of the earth have already committed fornication with this "whore." The inhabitants of the earth have already been made drunk with her wine. She herself is drunk with the blood of the martyrs that she has slaughtered. At the time of this chapter, she sits (verse 15) upon many peoples and multitudes and nations and tongues, and reigns (verse 18) over the kings of the earth.
The ten horns have received no kingdom as yet. Their "one hour" period of power with the beast is still future, after which they will hate the whore, and make her desolate. The context of chapter seventeen seems to precede the full, final denunciation of Babylon in Revelation 18:2 because the developments of Revelation 17:12-14 have not yet taken place.
This scene is presented to John by one of the seven angels, "of those having the seven bowls" (literal Greek, Revelation 17:1). Perhaps the angels are holding the vials of God's wrath, ready to pour them out as soon as the final steps in the apostasy are taken. Revelation's chiastic parallel to this scene is the judicial review of chapters 4-7. In chapter 7, angels are standing on the four corners of the earth, holding the four winds until the servants of God are sealed in their foreheads.
The time period of the vision is certainly approaching the final moments of probationary time for mankind. The great drama hangs in suspense as the contestants prepare to play their final cards.