How does Thomas Hardy ridicule prejudice about social class in "The Son’s Veto"?
Hardy isn't noted for writing satire, which is what "ridicule" is most commonly associated with. His characters are more noted for tracing reality, albeit painful reality. His characters are not noted for tracing satirical exaggerations of society's types. His works were criticized for their reality--and now and then burned--not for their ridiculing satire but for their real depictions of actual persons and situations. He was known however to add twists to the endings of his short stories and poems to produce a chill of ironic horror in the reader, which is notable in "The Son's Veto" as Randolph rides atop his mother's hearse on the way to her final resting place as the route leads past a mourning yet snubbed and rejected--by Randolph, not by Sophy--Sam, the grocer.
Having said this, it is possible to identify riducule of class prejudice in the character and role of Sophy's son, Randolph. He is raised to be like the Vicar, his father, and, like him, to disdain Sophy's country upbringing and lower class ways and dialect. Though Sophy was tutored by the Vicar to have more sophisticated city-like ways, the country girl still lay at the heart of Sophy's dialectic speech and understanding about life, at the heart of her world view, if you will.
When Sophy tells Randolph that she intends to accept Sam, the grocer, as her husband, Randolph flies into a fit of horrified emotion because Sam isn't a gentleman as society defines it, which was by wealth and family background and not by manners and courteous deportment as we tend to define it today. As we progress through the story and watch Randolph's horrid behavior toward his mother, forcing her onto her knees to swear she will never marry Sam and driving her to mutter continually to herself "Why mayn't I say to Sam that I'll marry him," we realize that (1) society's definition of gentleman is a faulty one and that (2) Randolph is no gentleman.
When Randolph is seen next to Sam's reformed self (he has undergone a significant character change from when he argued and lost Sophy at the beginning of the story), it is acceptable to interpret this juxtaposition as Hardy ridiculing the prejudice held by the upper class (and the aspirants to the upper class, such as Randolph was) about social class divisions.
'Not what you call a gentleman,' she answered timidly. ... The youth's face remained fixed for a moment; then he flushed, leant on the table, and burst into passionate tears. ... somewhat recovered from his paroxysm he went hastily to his own room and fastened the door. ... [saying] sternly at her from within: 'I am ashamed of you! It will ruin me! A miserable boor! a churl! a clown! It will degrade me in the eyes of all the gentlemen of England!'