Read Justin W. Jackson, “Shedding the Robes of Kingship: Samuel’s Subtle Imagery and a Surprising Lesson about Israel’s True King” (BBR 34.1: 20–42). Big idea: When David “exposes” himself (2 Sam 6), it isn’t because he’s flashing someone but because he where’s a simple levitical robe (these included undergarments, see Ex 28:42) rather than royal robes (good lexical reasons to read it this way). Michal—a princess—doesn’t approve of him wearing such common clothes. The point is that David (unlike Saul who is stripped in death parallel to Goliath) willingly acknowledges the supremacy of YHWH’s sovereignty. That’s why David says he will become even more contemptible in her eyes. It’s all about who the true king is.
If you like this sort of thing, I wrote a sartorial reading of 1 Samuel a little while back.