Bad and terrifying dreams are attributed to Shaytaan because:
(1) He initiates the bad and hateful thoughts and insinuates them into people's thoughts in dream form.
(2) He likes and approves bad dreams and evil thoughts.
(3) Bad dreams conform with his evil nature.
(4) His hate toward humans makes him do all that is possible to harm or frighten them - both during sleep and their wakefulness.
Al-Haafidh Ibn Hajar رحمه الله said: "Al-Muhallab said, '...Bad dreams are attributed to Shaytaan because they are created in his likeness (of evil)...' Abu 'Abdil-Malik said, '(A bad dream) is attributed to Shaytaan because it is according to his desire and goal.' Ibn al-Baaqillaani said, '...Allaah سبحانه و تعالى creates an unpleasant dream in the presence of Shaytaan (i.e. while he is present with the dreamer). This is why it is attributed to him.' And others say that it is attributed to him because he insinuates it." 
Imaam an-Nawawi رحمه الله said: "Al-Maaziri said, 'Allaah سبحانه و تعالى creates dreams that are indicators of harm in the presence of Shaytaan. They are metaphorically attributed to Shaytaan because he witnesses them - even though he does not really make them.' Others said, 'Both pleasant and unpleasant dreams are created, arranged, and willed by Allaah سبحانه و تعالى. Shaytaan has no doing in regard to either, but he witnesses an unpleasant dream, accepts it, and is pleased with it.'" 
In addition to bad and terrifying dreams, there are absurd dreams that can be caused by Shaytaan.
Jaabir Ibn 'Abdillaah رضي الله عنهما reported that a Bedouin came to the Prophet صلى الله عليه وسلم and said, "I saw in my dream that my throat was cut, and my head fell off and started rolling, so I ran after it, retrieved it, and put it back in its place." The Prophet صلى الله عليه وسلم smiled, and, addressing the man and the people next to him, said: "When Shaytaan makes fun of you during your sleep, do not tell people about it." 
In this hadeeth, the Prophet صلى الله عليه وسلم discouraged people from relating dreams that appear to be meaningless or frightening.
Wet dreams are associated with the ejection of seminal fluid during sleep. They often include visions of prohibited actions or interactions that are instigated by Shaytaan. In some cases, they may also be an echo of a person's thoughts during wakefulness.
Even though wet dreams are most common among men, it is possible for women to have them as well. Umm Salamah رضي الله عنها reported that Umm Sulaym رضي الله عنها came to Allaah's Messenger صلى الله عليه وسلم and asked him, "O Messenger of Allaah صلى الله عليه وسلم, Allaah is surely not shy from the truth: Is it required for a woman to perform ghusl when she has a wet dream?" He صلى الله عليه وسلم replied, "When she finds wetness (on her clothes), she must take a bath." Umm Salamah رضي الله عنها covered her face and asked, "O Messenger of Allaah صلى الله عليه وسلم, do women have wet dreams?" He صلى الله عليه وسلم replied: "Yes, may your right hand be prosperous! How then does her child resemble her?" 
Imaam al-Baghawi رحمه الله said: "Wet dreams that require ghusl have no interpretation. They may be caused by an annoyance of Shaytaan or by the dreamer's echoed thoughts." 
A believer should always remember that Allaah's سبحانه و تعالى power is boundless and prevailing, whereas Shaytaan's schemes are restricted by Allaah's سبحانه و تعالى permission and wisdom. Therefore, when a believer is distressed or alarmed by Shaytaan's spurring, he should turn to Allaah سبحانه و تعالى Who can easily alleviate his concern. Allaah سبحانه و تعالى says:
(Sooratul-A'raaf, 7:200-201)