Summary: David was told that the Philistines were waging war against the city of Ke’ilah. Eviyatar, the son of Achinoam had brought the Ephod (High Priest’s breastplate) with him when he fled from Nov and after consulting the Urim V’tumim (the parchment inserted inside the breastplate) his men came out of hiding and defeated the Philistines. Shaul travelled to Ke’ilah to capture David. David asked God through the Urim V’tumim what to do. He hid with 600 men in Desert of Zif where he was secretly reunited with Jonathan. However, the people of Zif were loyal to Shaul and betrayed David’s location. Having surrounded David, Shaul retreated when a messenger told him that the Philistines were about to attack.
A deeper look: The Gemara notes that the city of Ke’ilah was situated in the area of Judah on the Philistine border (Eruvin 45a). Rabbi Shmuel Laniado (16th century) explains that David felt compelled to protect the inhabitants of Ke’ilah as fellow Jews, but also considered himself indirectly responsible for their plight; since Shaul had expended so much man power on hunting David down, the Philistines had seen an opportunity for attack (Kli Yakar on Samuel I 23:1).
When Evyatar (the son of the slain High Priest Achimelech) escaped from Nov, he took the Ephod (breastplate) with him (Samuel I 23:1). This contained the Urim V’tumim which allowed the user to receive answers to questions posed directly to God (Exodus 28:30).
David asked God if he should come out of hiding and risk exposing himself and his men to Shaul in order to save the people of Ke’ilah. The Urim V’tumim responded positively. Yet his men refused until David repeated his request (Samuel I 23:4). Why did David’s men insist that he repeated the request?
Rabbi Levi ben Gershon (known as the Ralbag, d. 1344) explains that David had asked if they should wage war with the Philistines to help the people of Ke’ilah (Samuel I 23:2). The men understood that the response merely indicated that they were the only hope for Ke’ilah, but not that they were guaranteed success. If they chose to fight they risked revealing their whereabouts to Shaul for what could have been a fruitless mission. David asked once again if they would be victorious and also received a positive response. On seeing this, they attacked immediately. The wanted to defend their fellow Jews, but rightly refused to gamble David’s life, as he was destined for greatness.