In Of Mice and Men, Crooks is used to juxtapose Lennie as the two "weak ones" left behind by the men when they go to the cathouse. As such, Crooks and Lennie are the lowest ranking men in the Social Darwinian hierarchy of the ranch.
Whereas Lennie the mentally weakest of the men, Crooks is the strongest academically. He is surrounded by books and lives the life of an academic in his spare time. Crooks repeatedly calls Lennie "crazy."
Whereas Lennie is the strongest of the men, Crooks is among the weakest (he's probably stronger than Candy). As such, he feels threatened by Lennie.
Crooks, then, is the lowest member on the ranch: lower than Lennie, Curley's wife, and even Candy. At least these characters have partners: Crooks is completely alienated. As such, he is an outcast. Observe:
"S'pose you didn't have nobody. S'pose you couldn't go into the bunk house and play rummy 'cause you was black. How'd you like that? S'pose you had to sit out here an' read books. Sure you could play horseshoes till it got dark, but then you got to read books. Books ain't no good. A guy needs somebody-to be near him. A guy goes nuts if he ain't got nobody. Don't make no difference who the guy is, long's he's with you. I tell ya, I tell ya a guy gets too lonely an' he gets sick" (80).
Whereas Lennie is the keeper of the dream, Crooks is the realist, killjoy, prig, straight man: the one who sees through the dream. He knows the false idealism of the Dream Ranch:
"I seen hunderds of men come by on the road an' on the ranches, with their bindles on their back an' that same damn thing in their heads. Hunderds of them. They come, an' they quit an' go on; an' every damn one of 'em's got a little piece of land in his head. An' never a God damn one of 'em ever gets it. Just like heaven. Everybody wants a little piece of lan'. I read plenty of books out here. Nobody never gets to heaven, and nobody gets no land. It's just in their head. They're all the time talkin' about it, but it's jus' in their head" (81).
Whereas Lennie is an alazon (thinks he's better able than he really is), Crooks is an eiron, (one who is capable of more than he has done).
Maybe you guys better go. I ain't sure I want you in here no more. A colored man got to have some rights even if he don't like 'em" (90).
Crooks, like many of the other characters, is an example of someone ostracized by society because of some difference. In Crooks' case, he is both disabled and African American. Most of the men on the ranch have no respect for him because he doesn't fit in. Unlike the others, he is given his own room where he lives alone, but the room is in the stable, so he lives around the animals instead of human beings. Despite being disabled, Crooks is beaten at Christmas as part of a game. Candy relates this story with some glee, telling a newly arrived George, "If he coulda used his feet, Smitty says he woulda killed the nigger. The guys said on account of the nigger's got a crooked back, Smitty can't use his feet." The others call him "nigger" without ever considering his emotions.
Crooks himself tells how, as a child, his father warned him to not be friends with whites because they would turn on him. His father is right. Candy first holds out hope by telling Crooks about the farm. We see Crooks grab at that hope, but then when George comes back, George immediately dismisses the idea of including Crooks, and Crooks is even more withdrawn.
So Crooks is one more example of a character type we see over and over in the book. The men don't respect Lennie's mental disability. They don't respect Curley's wife--the only woman. They don't respect Crooks, the black man. These three could do anything, and they would never be able to win acceptance because society is unfair to those who are different.