Loneliness is not only present throughout the story, it is present in nearly all of the major characters in a very concrete way. Lennie and George travel around together in part because they "ain't like other guys". They are all each other has, and though not really equals in the relationship, both display an open need for the other.
Curley's wife is isolated on the ranch, and is the only woman there. She keeps coming back to the barn and the bunkhouse, just looking for conversation. Her loneliness ends up getting her killed.
Candy gives up his dog and lets Carlson shoot him, a deeply wrenching personal decision, and aside from that pet, he has no other true friends in camp, and no one his age.
Crooks is the only African-American, segregated in the barn, with no one even allowed into his quarters while he is unable to simply hang out and play cards in the bunkhouse.
Loneliness is everywhere in this story, beginning to end, in all its forms.