The use of background in a cartoon is to show the proper perspective of the scene shown in the drawing. It shows the location, time and mood of the characters shown in the drawing. While drawing background, you should keep horizon-line and vanishing point in mind. Horizon line is the height from where the viewer is seeing a certain scene in the drawing while the vanishing-point is that point where two parallel lines running into the distance seem to meet or disappear.
You should practice to draw several backgrounds to various characters.