Looking at the Media Study Design Key Knowledge we need to understand the "nature and function of and relationships between story elements in fictional media narrative, including: the function of setting in the narrative."
Setting is important in a film. It has several functions:
Set the time and place where the storyline takes place
Sets the genre of the film.
Within any films we have the major setting - this could be as big as the city where the story takes place. Within this bug setting we have sub settings - this could include character's houses or workplaces.
Setting and location are different things: The Dark Knight is set in Gotham but the filming location is Chicago.
The Dark Knight (Nolan, 2008)
Where is the film set? What is the film's location?
How are these two terms different from one another?