"I want a sweater."
Translation:Tôi muốn một cái áo lạnh.
All I can say is that in the "I wear a hat" case it might be that one is probably only wearing one hat, so oneness is assumed, and here you could want to have multiple hats, so oneness has to be specified.
Still, "Tôi đội một cái mũ", is not wrong; just probably wordy to the Vietnamese.
"Một cái" signifies 1 inanimate object out of all the available inanimate objects. For example, you'd tell the seller you want "a" sweater out of the many similar sweaters that are there (you haven't zeroed in on a particular one yet); "tôi muốn một cái áo len [chứ không phải hai cái hay ba cái]." The seller might suggest to you several, then when you pick one, you can say, "cái này" (this one) instead of "một cái này" because at that point, you have already singled that sweater out.