“Now the Spirit of the LORD had departed from Saul, and an evil spirit from the LORD tormented him” (1 Samuel 16:14). This is also mentioned in 1 Samuel 16:15–16, 23, 18:10, and 19:9. God sent a demon “evil spirit” to torment Saul. Saul had directly disobeyed God on two occasions (1 Samuel 13:1–14; 15:1–35). Therefore, God removed His Spirit from Saul and allowed an evil spirit to torment him. Likely, Satan and the demons had always wanted to attack Saul, God was now simply giving them permission to do so.
This leads to a related question—does God send evil spirits to torment people today? There are examples of individuals in the New Testament being turned over to Satan or demons for punishment. God allowed Ananias and Sapphira to be filled with the spirit of Satan as a warning and example to the early church (Acts 5:1–11). A man in the Corinthian church was committing incest and adultery, and God commanded the leaders to “hand him over to Satan” to destroy his sinful nature and save his soul (1 Corinthians 5:1–5). Jesus was led by the Spirit into the desert to be tried and tested by the devil (Matthew 4:1–11). God also allowed a messenger of Satan to torment the Apostle Paul in order to teach him to rely on God’s grace and power and not become conceited because of the tremendous abundance of spiritual truth he was given (2 Corinthians 12:7).
If God does allow evil spirits to torment people today, He does so with the goal of our good and His glory (Romans 8:28). Even though the demons are evil, they are still under God’s sovereign control. Just as in Job’s case, Satan and his minions can do only what God allows them to do (Job 1:12; 2:6). They never act independently of God’s sovereign and perfect will and purpose. If believers suspect they are being tormented by demonic forces, the first response is to repent of any known sin. Then we should ask for wisdom to understand what we are to learn from the situation. Then we are to submit to whatever God has allowed in our lives, trusting that it will result in the building up of our faith and the glory of God.
 Got Questions Ministries. (2010). Got Questions? Bible Questions Answered. Bellingham, WA: Logos Bible Software.