Thank you for your question.
God certainly spoke to the prophets of the Old Testament and the apostles in the New Testament by dreams and visions as the following examples show.
Genesis 15:1 After these things the word of the LORD came unto Abram in a vision, saying, Fear not, Abram: I am thy shield, and thy exceeding great reward.
1 Kings 3:5 In Gibeon the LORD appeared to Solomon in a dream by night: and God said, Ask what I shall give thee.
Matthew 1:20 But while he thought on these things, behold, the angel of the Lord appeared unto him in a dream, saying, Joseph, thou son of David, fear not to take unto thee Mary thy wife: for that which is conceived in her is of the Holy Ghost.
Acts 18:9 Then spake the Lord to Paul in the night by a vision, Be not afraid, but speak, and hold not thy peace:
This was the way God chose to make his purpose known.
Numbers 12:6 And he said, Hear now my words: If there be a prophet among you, I the LORD will make myself known unto him in a vision, and will speak unto him in a dream.
From the beginning many dreams and so-called visions were not of God.
God warns Israel of this:
Deuteronomy 13:1 If there arise among you a prophet, or a dreamer of dreams, and giveth thee a sign or a wonder,
2 And the sign or the wonder come to pass, whereof he spake unto thee, saying, Let us go after other gods, which thou hast not known, and let us serve them;
3 Thou shalt not hearken unto the words of that prophet, or that dreamer of dreams: for the LORD your God proveth you, to know whether ye love the LORD your God with all your heart and with all your soul.
4 Ye shall walk after the LORD your God, and fear him, and keep his commandments, and obey his voice, and ye shall serve him, and cleave unto him.
5 And that prophet, or that dreamer of dreams, shall be put to death; because he hath spoken to turn you away from the LORD your God, which brought you out of the land of Egypt, and redeemed you out of the house of bondage, to thrust thee out of the way which the LORD thy God commanded thee to walk in. So shalt thou put the evil away from the midst of thee.
God is saying that even if what a prophet said came to pass it was still not sufficient proof of his veracity. They had to compare his message with what God had already revealed and if it led them in a different direction they were not to believe it.
We all dream and Solomon with his God-given wisdom explains that dreams come about by the stress of life and are meaningless.
Ecclesiastes 5:3 For a dream cometh through the multitude of business; and a fool’s voice is known by multitude of words.
Ecclesiastes 5:7 For in the multitude of dreams and many words there are also divers vanities: but fear thou God.
Do we expect God to speak to prophets in dreams and visions today?
The answer is an emphatic NO!
As far as the Bible is concerned the last and greatest prophet was Jesus Christ, the son of God.
Hebrews 1:1 God, who at various times and in various ways spoke in time past to the fathers by the prophets,
2 has in these last days spoken to us by His Son, whom He has appointed heir of all things, through whom also He made the worlds;
His final prophecy was given to John c AD96 and is the last book in the New Testament.
The opening verse reads:
Revelation 1:1 The Revelation of Jesus Christ, which God gave unto him, to shew unto his servants things which must shortly come to pass; and he sent and signified it by his angel unto his servant John:
Some of the final verses read
Revelation 22:18 For I testify unto every man that heareth the words of the prophecy of this book, If any man shall add unto these things, God shall add unto him the plagues that are written in this book:
19 And if any man shall take away from the words of the book of this prophecy, God shall take away his part out of the book of life, and out of the holy city, and from the things which are written in this book.
It may be argued that the prohibition on adding to or taking from applies only to this book but in my opinion the principle applies to all the canon of scriptures completed by the end of the 1stcentury.
There have been no true prophets since, neither is there a need because God’s revelation of his plan and purpose was completed in Jesus Christ and all that is necessary for us to know is preserved in written form.
NKJV 2Timothy 3:16 All Scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness,
17 that the man of God may be complete, thoroughly equipped for every good work.
The doctrine is complete.
1Timothy 4:16 Take heed unto thyself, and unto the doctrine; continue in them: for in doing this thou shalt both save thyself, and them that hear thee.
2John 1:10 If there come any unto you, and bring not this doctrine, receive him not into your house, neither bid him God speed:
The gospel is complete.
Galatians 1:8 But though we, or an angel from heaven, preach any other gospel unto you than that which we have preached unto you, let him be accursed.
9 As we said before, so say I now again, If any man preach any other gospel unto you than that ye have received, let him be accursed.
All professed prophets that have arisen since the end of the 1stcentury have been false prophets.
Matthew 24:11 And many false prophets shall rise, and shall deceive many.
No further prophets are required because the scriptures themselves are able to make us ‘wise unto salvation’
2Timothy 3:15 And that from a child thou hast known the holy scriptures, which are able to make thee wise unto salvation through faith which is in Christ Jesus.
The message which is able to save was complete by the end of the 1st century and was able to save those that received it. The same message is able to save us today as it saved them, without God needing to send further prophets excepting Elijah who will be sent to convert the Jews in the last days.
Malachi 4:5 Behold, I will send you Elijah the prophet before the coming of the great and dreadful day of the LORD:
I hope this helps
If you are interested in understanding the Bible, a Bible course is available on www.thisisyourbible.com
There is no charge. The sole aim of the course is to help you to understand the Bible.
If you sign up you will be assigned, without cost, a personal tutor to guide you through the course and answer your questions.