The first implies that buying the coat was unnecessary.
"You needn't have bought this coat. You already have other coats."
The second implies that it was wrong for some reason to buy the coat.
"You shouldn't havе bought thіs coat. You can't afford it and you should be saving money."