Let's examine the lonely situation of some of the characters, see how they try to deal with it, and the result.
Candy is lonely because he is old, and is different from the other hands. His only comfort is his old dog, which keeps him company and reminds him of days when he was young and whole.
He has no relatives, and once his dog is killed is totally alone. He eagerly clutches at the idea of buying a farm with George and Lennie, but of course this all comes to nothing.
Candy's disappointment is expressed in the bitter words he utters to the body of Curley's wife, whom he blames for spoiling his dream.
George is also caught in the trap of loneliness. Just as Candy has his dog for company, George has Lennie (who is often described in animal-like terms). Continuing the parallel, George too is left completely alone when Lennie is killed.
The dream farm is his idea, and he says 'We'd belong there . no more runnin' around the country .'.
Another lonely character is Curley's wife. Newly married and in a strange place, she is forbidden by Curley to talk to anyone but him. To counter this, she constantly approaches the ranch hands on the excuse of looking for Curley. The only result is that the men regard her as a slut, and Curley becomes even more intensely jealous. Finally, her loneliness leads to her death as she makes the ' serious error of trying to overcome it by playing the tease with Lennie.
Curley himself is lonely. His new wife hates him as do all the ranch hands who despise him for his cowardice.
He has married in an attempt to overcome his loneliness, but has blindly chosen a wife totally inappropriate for the kind of life he leads.
His feelings are all channelled into aggressive behaviour which further isolates his wife and leads to the incident with Lennie where his hand is crushed.
Crooks is another who is isolated because he is different. He copes with it by keeping a distance between himself and the other hands. When he does allow himself to be drawn into the dream of working on George and Lennie's dream farm, he is immediately shut out by George's anger.