In addition to the cogent points made: While the situation of Crooks's having to live in the barn indicates the racial divide and his intense isolation, the conversation that ensues indicates that Crooks is not so different at all.
At first, Crooks is defensive when Lennie enters, and out of his vulnerability his strength to oppress Lennie comes; he attempts to hurt Lennie. But, when Lennie poses no threat for Crooks, he begins to confide in him:
"A guy can talk to you an' be sure you won't go blabbin'....I seen it over an' over--a guy talkin' to another guy and it don't make no difference if he don't hear or understand. The thing is, they're talkin', or they're settin' still not talkin'. It don't make no difference, no difference." His excitement had increased until he pounded his knee with his hand.
This passage is significant because it illustrates the commonality of all men in their existential need for sharing, for someone to help them measure the world. Although set apart racially, Crooks's human needs are identical to those of the other men; his words mirror those of George when he has spoken to Slim in a previous passage about the importance of having a friend. When he is provided the opportunity to be in communion with others, Crooks becomes excited and happy as he feels that he has found more of a place in nature, a common need for all men.
Crooks's room is representative of the racial divide that was in place during the time in which the novel is set, and is also indicative of Crooks's isolation from the rest of the ranch-hands. Because Crooks is black, he is not allowed to spend time in the bunkhouse with the others. As a result, he spends most of his time in his room by himself, ostracized from the rest of the ranch-hands.
In Chapter 4, Lennie wanders in to Crooks's room seeking company because all the other men have gone out. Though Crooks is suspicious of Lennie's motivations and behavior at first, Crooks ultimately sees Lennie's visit as an opportunity to gather information about Lennie's and George's situation. When Lennie tells Crooks of the plans he and George have to own their own farm, Crooks expresses doubt that this dream will ever become a reality. After recognizing how much the pair (along with Candy) want to achieve this dream, though, Crooks actually asks to participate. Perhaps Crooks, an outsider himself, recognizes that as Lennie is also an outsider, Crooks might fit in somehow.