John Steinbeck had a number of elements in his life that inspired him to write The Grapes of Wrath. As with Of Mice and Men, the story of the Joad family (and others like them) during the Great Depression partially takes place in Salinas Valley, in...
...the San Joaquin Valley, a fertile farming area which lies east of the Gabilan Mountains.
It was in this area that Steinbeck grew up. While his family was considered comfortable (middle-class), he still needed to work as a teenager—which he did on local ranches. (This ranching experience would have been valuable in writing Of Mice and Men, which takes place on a ranch in Salinas Valley.)
Steinbeck would also have other insightful experiences—in particular, living a life such as the Joads on Spreckels ranch:
Steinbeck worked as a farm laborer, sometimes living with migrants in the farm’s bunkhouse.
Steinbeck was very observant. This would be a vital talent for his stellar, award-winning career. He not only noticed the details of the lives of those around him, but also of the countryside and farms. His observations would become an integral part of the setting and the conflicts around which the plot of Grapes would center:
He became aware of the harsher aspects of migrant life and the darker side of human nature, which supplied him with material expressed in such works as Of Mice and Men. He also explored his surroundings, walking across local forests, fields, and farms.
Steinbeck was accused of lacking objectivity as a reporter; we can see how this might be the case in that his writing subjectively conveyed what he knew. He felt compelled to share the plight of what he had witnessed of the lives of migrant workers—men and women who desperately tried to survive, while providing food for their children, moving to any location they thought they might find work. They continued to do so even though they were time and again exploited, brutalized and degraded by Californians who were less a part of the United States and more a law unto themselves (according to Steinbeck's novel).
Ironically, earlier pieces of Steinbeck's writing became the inspiration for The Grapes of Wrath, which was...
...based on newspaper articles about migrant agricultural workers that he had written in San Francisco.
While his newspaper reporting was considered not "objective" enough to be material appropriate for a news publication, his observations and work inspired one of the greatest novels of his time. In 1940, it won the Pulitzer Prize for Fiction. It was controversial, and in some places banned and burned. It is considered by some to be his best work. What he witnessed spoke to the hearts of a nation, and the world, not only in the 20th Century. It continues to do so today. The novel's literary value comes not only from the author's ability to portray such memorable characters, but also from his ability to speak succinctly and realistically of lives so deeply affected by natural disasters in the Midwest farmlands that would become know as the Dust Bowl, during the depths of the Great Depression of the 1930s.
John Steinbeck was inspired to write The Grapes of Wrath because he was born in the Salinas Valley in Northern California and personally observed the huge influx of dispossessed farmers from Oklahoma, Arkansas, and the rest of the Dust Bowl area. He felt very sorry for the families who had to work like slaves in the rich California fields and orchards. Conditions were truly terrible. There was no welfare available. The families lived in cabins and typically had to buy their food from the company store, which overcharged them for everything. They all drove ancient jalopies which were always breaking down. Most of them had lots of children to support. It was nearly impossible for the kids to go to school because the families were always moving from job to job, following the crops from one area to another. Steinbeck was a socialist in those days and believed the federal government should help these desperate people. His book did something to bring the problem to the public's attention. The title The Grapes of Wrath suggests that there could be a revolution if enough people were sufficiently oppressed and became sufficiently angry. (The Grapes of Wrath was made into a classic film which is available on DVD and well worth viewing.)