Setting refers to the time, place, and circumstances in which the action of a literary work occurs. This obviously also affects the writing's atmosphere and tone.
As far as place is concerned in The Merchant Of Venice, the setting shifts from one location to another. The action at the beginning unfold in the streets of Venice, where Antonio and his friends converse and where we are also introduced to the Jewish moneylender, Shylock. The scene then moves to Belmont, the home of the beautiful and wealthy heiress, Portia, a much-desired woman with whom Bassanio, Antonio's best friend, has fallen in love.
The mood in the two scenes are in direct contrast. Venice is a bustling hive of activity since it is a merchant city, whilst Belmont exudes an aura of peace, romanticism and general conviviality. Venice is all about business, while Belmont, it seems, is about love.
Since these two settings form the major backdrop of the play, it is obvious that the scenes will flit from one area to another in each place. In Venice, for example, the scenes alternate from the streets of Venice to Shylock's house and then to the court in which Shylock's appeal for restitution is heard.
In Belmont, the scenes alternate from one room to another, to a garden, and then back to Venice and the Court of Justice where Portia, disguised as a lawyer, defends Antonio against Shylock's vengeful claim. After the dramatic scenes in court where a resolution is reached, the action moves back to an avenue that leads to Portia's house in Belmont, where peace prevails and everything ends well—a fitting finish to a rather dramatic tale.