In this chapter, David marries his second wife, Abigail.
In the beginning of this chapter Samuel dies and he is buried in Ramah. Ramah is Samuel's hometown in Ephraim; it's where he was born and it was where he lived after he grew up. David fled to Ramah on at least one occasion when he was running away from Saul.
For such a great figure, Samuel's death is very brief. Unlike Jacob and Moses, Samuel does not have a lengthy pre-death speech or prophecies. However, Samuel served the nation well and is almost singlehandedly responsible for guiding the nation through the Judges period and into their new monarchy. Israel will remain a monarchy from now until at least the Babylonian exile at the end of the Old Testament.
In the immediate context, this is a real blow for David, because Samuel was one of David's strongest supporters and probably the only person would could stand up to Saul. Now that Samuel is dead, there is nobody who can hold Saul in check anymore, and David loses one of his closest allies. This is only a footnote to what is an otherwise long and unrelated subject, the story of how David met his wife Abigail.
Basically, the way I interpret this chapter is David returning to be a shepherd. Let me try to break this chapter down and give a bit more of the social context.
So first of all, verse 4 tells us that David learns Nabal is shearing his sheep. This is the nomadic equivalent of harvest season. If you remember (amongst other things) the story of how Ruth married Boaz, it was when Boaz and his harvesters were celebrating the harvest because harvest season is the time of plenty and prosperity. Sheep shearing is very similar, because it is a seasonal event when shepherds of Israel annually harvest wool, which can't be eaten but it can be traded or made into clothes.
So David is approaching Nabal at a time of celebration to ask for his generosity, sharing in the good things that Nabal has. So David uses the language of generosity, but at the same time verse 7 tells us that David "did not insult" Nabal's men, and helped protect them from loss. Nabal's men later confirm this when talking to Abigail in verses 15-16. So even though David petitions Nabal with kind words, we can also see that David is making a sort of quid pro quo, asking for food in exchange for having protected Nabal's belongings. After Nabal refuses him, David responds by swearing an oath to kill Nabal and all his men, so it's obvious that David was expecting Nabal to reward him for his help.
In other words, David is returning to the occupation of his youth and is trying to be a shepherd and get paid for it.
This also gives us an idea how David plans to survive in the wilderness. He has already spent his youth shepherding, so now that he cannot return to the cities, it seems like he wants to return to being a shepherd. This is an occupation that is well-suited for the desolate Negev desert, far away from the (still very dry, but at least arable) lands of northern Judah and Benjamin.
In verse 10, Nabal replies by saying "Who is David?" Later in that same sentence, we can see that he doesn't mean this literally. Nabal knows who David is (because David is one of the most famous men in Israel), and verse 10 also tells us that Nabal knows about the conflict between David and Saul, when he says "There are many servants today who are each breaking away from his master". In effect, Nabal is saying two things. The first thing he's saying is that he doesn't know David and he doesn't want to know David. As far as Nabal is concerned, David is a stranger to whom he owes no obligation and will do nothing to help him. The second thing Nabal is saying is that he doesn't want to help David because he is probably afraid of Saul's retaliation. Remember just a few chapters ago when Saul almost killed off the entire priesthood of Israel because one man gave David a couple loaves of bread. If Nabal gives David a lot of food, it is almost certain that Saul will seek Nabal's life as well. So Nabal is probably trying to avoid retaliation.
However, we are told that Nabal is an evil and foolish man by the author of 1st Samuel in verse 3, Nabal's men in verse 17 and Abigail herself in verse 25. So while Nabal's response might be prudent in a certain light, we should also consider David's immediate retaliation when he tells his men to "gird their swords", and Abigail similarly realizes that Nabal is doing wrong.
As Abigail alludes, the name Nabal itself means "fool" in Hebrew, which is unlikely to be a real person's given name. It could be some sort of literary or figurative name.
In the end, Abigail realizes that Nabal behaved inappropriately and goes to reconcile things with David behind Nabal's back, while he is busy feasting and celebrating (as previously noted, this is a time of celebration in Nabal's household). When Nabal finds out that he nearly died, he actually does die from the resulting heart attack (as well as being "struck" by the LORD). David was obviously impressed by Abigail's behavior, because not only is Abigail beautiful, she is also intelligent (v. 3) and discerning (v. 33).
Abigail plays only a minimal role from here through the rest of the bible, which I think is unfortunate because she seems like a really strong woman and could have been a great biblical role model. It's difficult to judge what kind of role she might have had behind the scenes in David's life and subsequent kingship, because she stayed with David for the rest of her life but every reference to Abigail after this chapter either refers to her as David's wife or as the mother of one of his children. It's obvious from her behavior in this chapter that Abigail was capable of acting on her own initiative and could make a big difference in the world.
In the last couple sentences of this chapter we are told that David marries a second woman and that his first wife, Michal, is given by Saul to another man. The second part reminds me of Samson's wife who was given to another man in Judges 14:20. There are many people in the bible who married more than one woman, and I think a holistic analysis of passages like e.g. Gen 2:24 shows that it was not God's intent for people to have more than one spouse. In the life of Abraham, we saw him have a lot of problems because he fathered a child through Hagar. Jacob similarly endured a lot of strife in his family because he married both Leah and Rachel.
We don't really ever get to learn much about Ahinoam, David's third wife. It's obvious from all these examples that polygamy is very common in Israelite society through various time periods, but my personal opinion is that it is not validated or approved. Some of the laws in the Pentateuch address situations with having multiple wives, such as mandating a husband to provide food and clothing for all his wives and not depriving unloved wives of what they are owed by the social contract of marriage. I do not believe these laws are intended to validate polygamy any more than the laws about slavery are intended to validate slavery; in both cases I believe these laws are intended to be pragmatic restraints on what are otherwise unjust practices.
To put it more concisely, the references to David's multiple wives are descriptive, not prescriptive. This is true of many parts of the bible, which I have discussed before, so I won't rehash those points here.