Dreams come from one of three sources
Watching horror films; spending the whole day desiring or worrying over something; or being in desperate need or trouble can result in us having dreams at night. Indeed the bible talks of these kinds of dreams:
as when a hungry man dreams that he is eating, but he awakens, and his hunger remains; as when a thirsty man dreams that he is drinking, but he awakens faint, with his thirst unquenched . (NIV) Isaiah 29:8
These dreams carry little or no meaning. Their source is purely natural and they are dictated by the circumstances we find ourselves in. (Ecclesiastes 5:3)
Once again the bible has many examples of these types of dreams.
God spoke to Abimelech, a pagan king, in a dream at night (Genesis 20: 3-7) warning him against taking Abraham's wife.
God spoke to Pharaoh the king of Egypt in a dream. God used a dream to warned Pharaoh about a famine that was to affect the whole world. The dream enabled Pharaoh, with the help of Joseph, to make adequate preparation for this famine. (Genesis 41:1-7)
Nebuchadnezzar king of Babylon had a dream from God (Daniel 2) about the future kingdoms to come.
The Midianite soldier had a dream from God about the coming defeat of his army. This soldier was an ordinary man, not a ruler nor leader. It shows how God can speak to ordinary people through dreams. (Judges 7:13)
Pilate, the man who had the responsibility for letting the Jews crucify Jesus, his wife was warned by God in a dream about them harming Jesus (Matthew 27:19)
God also spoke to the Magi, who were probably pagan astrologers, in a dream, warning them not to return to Herod (Matthew 2:12)
There are also loads of present day examples of God speaking to people through dreams. The problem is that we do not always recognize it.
Of course God also speaks to committed Christians or God fearing people by dreams.
Jacob (Genesis 31:10 - 13), Joseph (Genesis 37: 5 - 8), Daniel (Daniel 7) and Joseph the husband of Mary (Matthew 2) all received insight from God through dreams (Numbers 12:6).
Dreams are visions that we have when sleeping. Satan can and does attempt to play the role of God ( 2 Corinthians 11:14). He is a master deceiver and often pretends to be an angel of light. Even when we are walking in the light of God's word demonic forces can still attempt to attack us through our dreams.
We can also open up ourselves to demonic deception by walking in sin or disobedience to God's word (James 3;13-17).
When we have dreams that put fear and terror into us we should immediately see the finger prints of satan (2 Timothy 1:7). We need to pray against these attacks of satan.
How to interprete dreams