1 Samuel 16:22

And Saul sent to Jesse, saying, Let David, I pray thee, stand before me; for he hath found favour in my sight.

After God rejected Saul from the throne, Saul came under an evil spirit with distracted behavior, brooding melancholy, despair, and near loss of reason, without true repentance but with bitter rebellion. On the advice of those who saw his distracted condition and of his counselors, soothing music was recommended to calm him, and Saul in a favorable, humbled frame of mind sent messengers to Jesse asking for David. In the providence of God David was brought to Saul's notice as a skillful musician and harp player, a valiant man of war, prudent and faithful in all matters, especially guided by the Lord, with lofty, heaven-inspired playing.

Saul expressed delight in David and his music, soon loved him, and asked Jesse for David to remain in court service as armor-bearer and attendant. He wanted one who knew from the Lord how to act according to His will to help take charge of and govern the kingdom, thinking that one favored by God would be a safeguard to him and perhaps save his life from his enemies when exposed to them. David's skillful playing upon the harp soothed Saul's troubled spirit, charmed away the dark cloud and gloom that settled upon him, brought his excited mind into a more rational and happy state, and continued until the evil spirit departed.

David's service at court in his youth was intermittent and kept him intimately associated with the king's household, but when not needed he returned to his flocks among the hills and sheepfolds with relief and gladness, keeping his simplicity of spirit and demeanor. That time at court gave him insight into the cares, sorrows, and perplexities concealed by the glitter and pomp of royalty, and taught him how little human glory is worth to bring peace to the soul. The verse belongs to the account of David as a shepherd lad chosen by God and promised the throne, showing him trusting God's promise and God's word while Saul as the established king was bent on keeping his power, which enabled David to stand against the stronger ruler. It also reveals Saul's divided character, in which good and evil were continually in conflict and evil kept striving for control, so that he could show tenderness and favor toward one who pleased him yet later act unjustly and cruelly even toward his best friends.