When a novelist manages to describe or evoke something you thought or felt, without realizing that other people also found themselves in the same situation and had the same feelings, it creates that same solidarity. Maybe it's better to think of humor not as a tool to express the solidarity, but a kind of by-product. Maybe the realization "I'm not on my own on this one" is always, or often, funny.