I have edited Candy and Crooks out of your question in accordance with eNotes policy, and I am confining my discussion to the character of Carlson in order to avoid trying to answer what would be three separate questions.
Carlson owns the German Luger which is eventually used by George to shoot Lennie. Carlson is a middleaged man who probably served in World War I and brought the Luger back from Europe as a souvenir. Lugers were carried by German officers, and they were the favorite souvenirs of American soldiers. Carlson uses the Luger to shoot Candy's old dog which is smelling up the bunkhouse. After firing a single shot he spends a long time cleaning the pistol. Here is a partial description:
Carlson found a little cleaning rod in the bag and a can of oil. He laid them on his bed and then brought out the pistol, took out the magazine and snapped the loaded shell from the chamber. Then he fell to cleaning the barrel with the little rod.
The Luger serves several purposes, including an indirect characterization of its owner. The loving care Carlson gives his war souvenir shows that he remembers when he was young and felt proud and confident as a patriotic member of a great military force with a strong sense of mission. He may have been a noncommissioned officer. The Great Depression caught him at a bad time. He is getting old and has no hopes for improving his life in the future. The dog's smell bothered him more than it did the other men because it was a constant reminder of his situation--sleeping on a mattress made of a burlap sack filled with straw, doing backbreaking farm labor for fifty dollars a month and plain food which, as Slim points out, is never sufficient to satisfy all the hungry men. Carlson is portrayed as surly, taciturn, unfriendly, and unlikable, but it is easy enough to understand why he has developed such a personality. His youth is gone, his present life is miserable, and he has no hope for the future.
Steinbeck planned to have George kill Lennie in the last chapter. That is the biggest event in the story. But the author needed to establish that there was a gun available--and it had to be a pistol. George could hardly try to kill Lennie with a knife or a club because, for one thing, it would look too gruesome. But Lennie is so big and strong that George might end up getting killed himself. Steinbeck created Carlson mainly to explain how George could end up with a pistol. When Carlson is persuading Candy to let him kill the old dog, he explains in George's hearing exactly where to point it in order to kill painlessly with a single shot. And when Carlson is cleaning his Luger afterward, George is able to see exactly how this foreign weapon works. Steinbeck made the gun a Luger because this distinctive-looking gun could be easily recognized as Carlson's, and the reader would immediately understand how George managed to have a pistol when it came time to shoot his friend. At the same time, the Luger would characterize Carlson as an aging war veteran who once had dreams of glory.
But Steinbeck also uses Carlson to represent the millions of older men who were the worst victims of the Great Depression because they could see no way of ever improving their lives. Carlson and Slim are the only middle-aged men in the story. Slim is not discouraged because he is intelligent and skilled. He has leadership qualities, in marked contrast to the unsociable Carlson, and Slim undoubtedly gets higher wages than the others.