In the previous chapter, Saul was enraged that the people would hold David in higher regard than himself. Like so many other times, we see that Saul is chiefly concerned about what people think about him rather than what the LORD thinks. In some situations, that leaves Saul docile and easily manipulated by the whims of the people. 1 Samuel 15:24 shows us this most clearly when Saul says that he "feared the people and listened to their voice". However, when Saul perceives someone as better regarded than himself, then we see that his desire to be popular makes him murderous. It's the exact same impulse that drives him in both situations, whether to try to boost himself up or tearing someone else down.
David never even did anything to claim the throne or betray Saul, but because the people favor David, Saul will try to have him killed.
In this chapter, we see Saul continuing in his desire to murder David, and he orders all of his servants and court officials to also kill David. As the king, they are bound to obey him even when his orders are evil, as is the case here. However, we already knew that Jonathan loved David (1 Samuel 18:1-4), so Jonathan tries to reason with his father and convince him that David has done him no harm (which is true). Initially, Saul listens and David is able to return to his post "as formerly". However, it doesn't last and when an evil spirit visits Saul again, Saul strikes out to kill David again. This is somewhat ironic because David had originally gone to Saul's house in order to relieve him from these evil spirits, and now they are goading Saul to kill David.
Another thing I want to mention that perplexed me when I first read 1 Samuel, which is the LORD sending an "evil spirit" to torment Saul. A plain reading of this can be troubling because it seems to suggest that the LORD controls or directs evil spirits. Do demons work with God for common goals or common purposes?
I think the references to evil spirits in 1 Samuel (as they relate to Saul) are ambiguous, so it's hard to say anything definitive based on these chapters. I think the best way to interpret these chapters are in the context of the bible as a whole. My opinion here (and elsewhere) is that God does not "work with demons"; he restrains them in many situations, and then in some situations and for certain reasons he will stop restraining the evil spirits. God does not need to command a demon to do evil; given the opportunity, it will do harm to anyone and everyone it can. I believe the only reason our world can exist as it does is because God restrains all of the evil spirits from destroying it.
1 Samuel 16:14 tells us in the same sentence that the spirit of the LORD departed and an evil spirit came to fill in the vacancy. As I said before, I believe that the spirit of the LORD covering Saul was inhibiting the powers of evil from harming him and when Saul sinned, he drove the spirit of the LORD away and thereby opened the door to his own torment. This isn't the only way that evil spirits enter someone's life, but it is one of the most common. Those who do evil open themselves to receive evil unto themselves. Genesis 9:6 tells us that "whoever sheds man's blood, by man shall his blood be shed". That is, those who commit murder have opened themselves to be murdered in retaliation. I would write as a second law, "whoever commits evil shall be punished by it."
Other teachers have said that evil is its own punishment. But that doesn't just mean when you do something evil you will feel really bad about it and that will be your punishment. Committing an evil act has emotional and spiritual consequences as well, and I am not trying to make light of it. After Saul sinned and the spirit of the LORD departed from him, his life has grown darker and darker, and because of his position of power, that darkness is spreading to the people around him. David is also now suffering for Saul's sin, because through no fault of his own David is the recipient of Saul's wrath.
But. There is an important but here. David is humble, anointed, and is protected by the spirit of the LORD. He is going through a lot of really hard situations, and I can't even imagine what it's like to have the king try multiple times to murder you in all of these situations. First Saul tried to kill him with guile, letting the Philistines strike him down. When that failed, Saul used his own hand and spear. When that failed, he is now commanding all of his servants to strike David down. But the LORD is protecting him, restraining the evil that seeks to consume him. It started with Goliath, when David killed the formidable giant. Then David prospered through various situations until he is now one of the top commanders in Israel's army.
In this chapter we see the LORD's protection in a much clearer way, when Saul sends not one, not two but three delegations of messengers to arrest David in Naioth so that he can be put to death. When all three groups of messengers are interrupted by the spirit of God compelling them to "prophesy", Saul goes himself to harm David. But even Saul is involuntarily compelled to prophesy all day and night in Samuel's presence. This is the spirit of God protecting David, because David has not done anything to take himself out of the LORD's protection. For most of 1st Samuel, when David escapes death it often looks like a coincidence. Michal protects him in one case, Jonathan protects him in another, and whenever Saul tries to pin David to a wall with his spear, David evades him and runs away. But from the story in verses 18-24 we can see that these aren't coincidences. The LORD is protecting David through all of his trials, and the LORD is going to bring him into the kingship.
Why does David have to face all of these trials then? We can see two reasons from the text. The first reason is that Saul is becoming increasingly evil, and he is inflicting his evil onto the people around him. It's really unfortunate, but this is a fact of life, that even the innocent suffer when evil men do evil things. However, there is a second reason which is that God is using these trials to change and shape David's heart, to teach him resilience and humility. The cynics of the world only see the first reason, they see evil inflicted by one onto another and reason that God cannot exist because he would not permit harm to come to those who do not deserve it. Others reason that God might exist, but if so then he must be evil because he permits the innocent to suffer. What the cynics don't see is the second factor, how suffering can breed endurance and strength in the humble, what Victor Hugo calls the "excellence of misfortune". To quote from him more fully, Hugo writes:
He ate of that terrible, inexpressible thing that is called de la vache enrage; that is to say, he endured great hardships and privations. A terrible thing it is, containing days without bread, nights without sleep, evenings without a candle, a hearth without a fire, weeks without work, a future without hope, a coat out at the elbows, an old hat which evokes the laughter of young girls, a door which one finds locked on one at night because one's rent is not paid, the insolence of the porter and the cook-shop man, the sneers of neighbors, humiliations, dignity trampled on, work of whatever nature accepted, disgusts, bitterness, despondency. Marius learned how all this is eaten, and how such are often the only things which one has to devour. At that moment of his existence when a man needs his pride, because he needs love, he felt that he was jeered at because he was badly dressed, and ridiculous because he was poor. At the age when youth swells the heart with imperial pride, he dropped his eyes more than once on his dilapidated boots, and he knew the unjust shame and the poignant blushes of wretchedness. Admirable and terrible trial from which the feeble emerge base, from which the strong emerge sublime. A crucible into which destiny casts a man, whenever it desires a scoundrel or a demi-god.
Les MiserablesPeople who misunderstand the ways of God see only evil. Those who understand the ways of God see how God brings redemption and resurrection from and through the darkest of situations, without in any way himself besmeared by the darkness. God changes the darkness into light, even as it is written: "For behold, darkness will cover the earth and deep darkness the peoples; But the Lord will rise upon you and His glory will appear upon you." C.S. Lewis also writes about this in The Great Divorce when he says that to those who are going to heaven, even the earth becomes part of heaven. And to those who are going to hell, even the earth becomes part of their hell. God has the power to change the past, because even past evils in a person's life can be turned into good by how the LORD changes that person. This is one of the mysteries of God that few people understand. It's not that God changes what objectively happened, but he can change how we perceive those events and how they impact our lives. That is the power of redemption and healing that flows from God, that it can heal not just our present but even the wounds of our past.
In the end, David goes to Samuel, perhaps hoping that the prophet would be able to protect him. Alternatively, David might be going to Samuel to ask for guidance in how he should respond to Saul’s ominous behavior. Saul begins sending groups of men to capture David, but every time the spirit of God comes upon them and they begin prophesying, almost as if they had no choice in the matter. In the end Saul himself goes to capture or murder David, and Saul also prophesies, stripping off his outer garments (but probably still wearing his inner garments) he lies for a full day prophesying before Samuel. The last time Saul prophesied was an entertaining story. Quirky, perhaps confusing, but overall a positive experience. This time, Saul is a much darker figure, on his way to murder David, when he is interrupted by the spirit of God inducing him to prophesy. Although I think God still wants to redeem Saul, it is likely that he is acting more for David in this instance than for Saul.
I also want to point out that David is saved from death three times in this chapter by three different people. The first time Jonathan warns him that Saul is going to kill him, so David hides. The second time, Michal helps David down the window and conceals his departure from Saul's servants. The third time David goes to Samuel in Naioth and Samuel protects hiim from Saul's assassins. This shows us that even before David became king, he is already gathering around himself a coterie of allies that support him through his challenges and will continue to support him throughout his reign (except for those who die, of course).