Revelation 1 states that John was on the island called Patmos because of the word of God and the testimony of Jesus.
While there, John was "in the Spirit" on the Lord's Day and heard a voice commanding him to write what he saw in a book and send it to seven churches: Ephesus, Smyrna, Pergamum, Thyatira, Sardis, Philadelphia, and Laodicea.
Patmos therefore forms the geographical setting for the visions of Revelation and stands near the western coast of the Roman province in which all seven recipient churches were located.