In this chapter, Jephthah saves Israel from the Ammonites, but unintentionally vows to sacrifice his daughter to the LORD.
First of all, verses 1-3 seem to imply that Jephthah is literally the son of Gilead, but I think this is very unlikely because of the timeline involved. According to Num 26:29, Gilead is a grandson of Manasseh, who died in Egypt roughly 400 years before the Exodus. It should be obvious then that Jephthah is not literally the son of Gilead, but much more likely a descendant of Gilead, and verses 2-3 are almost certainly referring to other descendants of Gilead. It's possible they are literally Jephthah's brothers, but it's also possibly a reference to just Gileadite clansmen in general, who drive him out of the land of Gilead (which is collectively their inheritance).
We have never heard of the land of Tob before. Presumably it's just one of the many wastelands in this arid region.
It's not really clear from the story why the Gileadites thought that Jephthah would make a good leader. He must have had some sort of reputation for feats of strength, but if so we never learn of them. The main point seems to be the inconsistency between the Gileadites driving Jephthah out because he's the son of a prostitute, but then coming back to him in their time of need.
After that, Jephthah argues briefly with the king of Ammon. Basically, this dispute is over the land of Sihon, which is the territory southeast of the Jordan. The land of Bashan was the northeast territory, and that's where Gilead (and Manasseh) are. Ammon is trying to claim the land south of that which is the home of the Reubenites and Gadites. Gilead is probably not directly attacking, but what was clear from the prior chapter was that Ammon is threatening most of Israel, including crossing the Jordan to attack Judah, Benjamin and Ephraim. Giving the land of Gad and Reuben would probably not stop Ammon from attacking the remaining tribes of Israel.
What happened was that the Amorites captured this land from the Ammonites, and as Jephthah recites, Israel conquered it from the Amorites on their way through to the promised land. Although Israel never attacked the Ammonites, the Ammonites are now seeking to reclaim the land that they once possessed before the Amorites took it from them.
But let's be realistic. Israel has fought many, many wars that neither had, nor required, any provocation. The Midianites, Moabites, Amalekites, Philistines, etc. have all attacked Israel without any prior provocation. One could reasonably suggest the Israelites' invasion itself had no provocation. The Mideast in this time is definitely a "might makes right" sort of place. Every war is justified by victory. Jephthah himself implies this in v. 24 when he says "Do you not possess when Chemosh your god gives you to possess?" This statement (and those that follow it) implies that any land you possess is given to you by your nation's god, which in turn justifies your possession of it. If your god is strong enough to take a land, then you deserve to possess it.
The second implication is something I have stated before, which is the notion that every god in the OT is inherently a national god. The LORD is the national god of Israel, Chemosh is the god of Ammon, and Judges 10:6 lists "the gods" of many different nations, without specifically naming them. This was a concept I discussed several times (what I call "patron gods"), and it is very important in many places in the OT, such as here. Because Israel's god is stronger, they defeated the Canaanites in their invasion. Because Israel's god is stronger, they drove out the Amorites from the Transjordan region and killed Sihon, king of the Amorites. And it is the strength of the LORD that will preserve the Israelites against the Ammonites now.
Jephthah brings up another point, which is that the Israelites have possessed this land for generations now (80 years after Ehud alone, Judges 3:30, another 40 years after Deborah and 40 years after Gideon), what he calls 300 years. I'm not going to bother working out the chronology, but this is probably reasonably accurate given how many judges have already come and gone. What this shows is that the Ammonites attacking now is opportunistic. They aren't attacking because they think they have a right to this land, but because they think they can win it. The Ammonites' reason for invading is almost entirely pretense.
Anyway, Jephthah destroys the Ammonites as we should all expect by this point, but with a pretty twisted conclusion: he promises to sacrifice whatever (or whoever) comes out of his house to greet him after his victory, and by chance it is his only daughter. Like Gideon's ephod, this shows that even the judges of Israel can and do make serious mistakes, and the least I can do is call this vow a serious mistake. Fulfilling it (as he does) is not to Jephthah's credit.
God commanded Abraham to kill his only son, but then relented and stopped him from doing so. Deut 18:10 specifically commands the Israelites to not offer their sons or daughters as sacrifices, and one can speculate that it is from Canaanite human sacrifices that Jephthah got his idea to make this vow. It is unlikely that Jephthah expected an animal to walk out of his home's front door to greet him upon his return; although he might not have desired his daughter's death, he must have known or thought it would be a person, perhaps a servant or other relative. But it doesn't matter: the law of Moses makes no provision for human sacrifice. Leviticus 20:2-5 puts this in even stronger terms, demanding that anyone who sacrifices his children to Molech should be put to death. Jephthah doesn't sacrifice his children to Molech, but there can be little doubt that it was contrary to the law.
If Jephthah sinned and violated the law, why did the LORD save Israel through him? There are many reasons, but the most relevant is that the LORD didn't save Israel for Jephthah, he did it for Israel. But you could similarly ask why the LORD passed the covenant on to Jacob, who stole his brothers blessing, why Judah is the chosen tribe for the kingship when Judah himself married a Canaanite, and the list could go on and on. Just because "a hero" does something doesn't mean that the LORD approves of their action, and just because the LORD works through somebody doesn't mean they're perfect. The LORD is working to bring redemption to the earth, and that means by definition the people being worked through are not themselves yet redeemed. More often than not, people are purified and redeemed by being worked through, when the LORD is bringing redemption through them to other people. Why some people are chosen as vessels of redemption, while others are chosen as recipients, is beyond my understanding or wisdom. But I have learned enough to recognize that more often than not, this is how the LORD works.
In the case of Jephthah, as with many others throughout the bible, we see both the redemption that they bring (such as rescuing Israel) and the spots where they also need redemption (such as here, where Jephthah inexplicably vows to perform a human sacrifice).