Visions may involve natural or supernatural settings, and the individual experiencing this miracle may be either an observer or a participant. In the Old Testament, the absence of this type of communication from God concerned the Israelites (1Samuel 3:1, Proverbs 29:18). Some of the great men of the Bible experienced this phenomenon, often changing their lives and many others in a dramatic way.
The word 'visions' and its singular version occur 86 times in the King James Translation of the Old Testament and 17 times in the New Testament. This compares to the words 'dreams' or 'dream' occurring 87 times in the Old Testament and 8 times in the New. The book with the most occurrences of the word is the book of Daniel (32 times) followed by Ezekiel (18).
Who had them?
The Bible records far more people who received revelations from God using this type of communication method than those who received messages via dreams. Those who have experienced these revelations from the Eternal include Eliphaz (a friend of Job, Job 4), Abraham (Genesis 15), Jacob (Genesis 46), the false prophet Balaam (Numbers 24), Micaiah (1Kings 22) and a very young Samuel the prophet (1Samuel 3). Nathan the prophet was told not only that King David's throne would be established FOREVER but also that David's son (Solomon) would build a temple for God in Jerusalem (2Samuel 7).
Ezekiel was given visions of God, his glory, and his throne (Ezekiel 1), was informed of the abominations committed at Jerusalem's temple (chapter 8), was taken before Israel's elders in Babylonian captivity (chapter 11), saw a valley of dry bones representing Israel regathered (chapter 37) and witnessed God at the temple calling for his people to repent (chapter 43).
Daniel saw several visions, including one showing four great world empires (Daniel 7), the Ancient of Days sitting on his throne (Daniel 7:9 - 10), a prophetic ram and a he-goat (chapter 8), and the events which will occur in the end time (chapter 10). Isaiah was told of future events to occur to the Kingdoms of Judah and Jerusalem (Isaiah 1, 22) and Babylon (chapter 21). Many of the Old Testament's Minor Prophets received visionary revelations, including Obadiah, Nahum, Habakkuk, Amos, and Zechariah.
In the New Testament Peter, James, and John saw the transfiguration of Jesus and the appearance of Moses and Elijah (Matthew 17:1 - 9). Stephen, just before becoming the first Christian martyr, sees in vision God's throne with Jesus standing at his right hand (Acts 7:55). A believer named Ananias has Jesus tell him to visit a repentant Saul (Apostle Paul) and heal him (Acts 9). A Roman Centurion named Cornelius is told to request that Peter come and baptize him just before Peter is miraculously shown a sheet filled with unclean animals (Acts 10). The apostle John had the entire book of Revelation revealed to him through visions.
Paul experiences several miraculous revelations throughout his life. His first one is seeing a man named Ananias coming to baptize and heal him (Acts 9). Soon after his baptism he flees to Arabia, where he is taught the gospel by Christ himself through what is likely a series of visions (Galatians 1:11 - 12, 17 - 18). Later in his ministry, he miraculously sees in his mind a man from Macedonia asking him for help (chapter 16), being told to speak boldly in Corinth (chapter 18), and informed to leave Jerusalem immediately (chapter 22). Paul is also blessed to see in his mind's eye the 'third heaven' where God's throne resides (2Corinthians 12).
What is their purpose?
In the Biblical record, we find visions serving a variety of purposes.
To convey what will happen in the near or distant future (prophecy)
To teach spiritual truth
To strengthen a believer during a trial
To reveal events that would otherwise be unknown
To reveal the power and majesty of God and Jesus Christ
To confirm punishment for sin
To inform someone or a group to do God's will
To encourage and provide hope
To confirm a blessing or promise
To reveal God's plan for man
There are a few cases in the Bible where visions are incorrectly assumed to be seen. A man named Zacharias is rendered unable to speak after an angelic being appears in the temple and declares he, in his old age, will become the father of John the Baptist. Those who meet Zacharias outside the temple think he has seen visions. Two men from Emmaus, after the death of Christ, state that some women saw a vision of angels near Jesus' tomb declaring he was alive (Luke 24:23). The women, however, actually saw two angels manifest themselves in order to reveal Jesus' resurrection (verses 4 - 7). King Herod, because he saw it pleased the Jews, arrested the apostle Peter. After the church prayed for him, an angel came and freed him from prison. Peter was so astonished at what happened that he thought he was seeing visions (Acts 12:1 - 9).
It is a risky thing to do for any person to claim that God has given them special revelations (unless he has actually done so - Numbers 12:6). Those who lied about receiving messages from the Lord, regardless of the means, were put to DEATH in the Old Testament (Deuteronomy 13:1 - 3, 5, see also Jeremiah 23:16, 27, 32).
In the end time
The Bible records the apostle Peter, citing Joel 2, stating that visions will play a role in the events leading to the second coming of Jesus Christ (Acts 2:17).