Hats symbolize the gulf between the Sheridans, the affluent middle class family giving the garden party, and the working class people they hire and who live in poverty nearby them. Hats represent the world of pleasures and luxuries that attract Laura and her cohort and distract their attention from the poor.
In this story, the death of a workman who lives nearby occurs on the day of the family's garden party. Laura, a daughter who had previously felt there is no difference between the classes, wants the family to cancel the party out of deference to the dead man. Her mother pooh-poohs that idea as "extravagant," saying there's no need to inconvenience themselves and nobody would expect it. She distracts Laura by giving her her own hat. But Laura is still resisting carrying on with the party--until she sees herself in the mirror, wearing the hat:
"I don't understand," said Laura, and she walked quickly out of the room into her own bedroom. There, quite by chance, the first thing she saw was this charming girl in mirror, in her black hat trimmed with gold daisies, and a long black velvet ribbon.
When her concern that it might be callous to go ahead with the party resurfaces, she determines to ask her brother his opinion. But when he tells her she looks "splendid" in her hat and says, "What an absolutely topping hat!," she changes her mind about asking him.
In the end the party goes forward, but afterwards, Mrs. Sheridan sends Laura to the dead man's working class hovel with a great basket of leftovers for his family. Laura is suddenly ashamed to be showing up in showy, frivolous, expensive hat. She says to his family members, "Forgive my hat."
Mansfield's point is that class differences are built on an accumulation of small privileges, such as easy access to pastries, hothouse flowers, and fine hats. Class differences won't go away, because those with privileges enjoy their luxuries too much. Laura is so pleased to have a beautiful hat and to be complimented on it that she allows herself to forget about the plight of the less fortunate. Only when confronted with the poor directly does she feel embarrassed about her frivolous hat, but we can be sure that once she gets home and around her own people, all her twinges of conscience will be smoothed away, probably with more new hats.