Short answer? Very. A piece should seldom be viewed in isolation from the context it was written in. It is important to be aware of any important historical events which may have influenced the author in the writing of their work, and you should also research the period in general. I would also reccomend acknowledging whether the text is part of a specific literary movement, for example, Modernism or Romanticism, as this too can influence the text in profound ways which you should address in your written work. Another important thing you should address is whether there are any schools of criticism which can be, or have been, applied to the text you're studying. For example, if you're studying Oliver Twist it would be worth looking into Marxist criticism, which addresses questions of class and poverty. These schools of criticism can truly enrich your essays, and give you spring boards upon which to construct your own argument, either in agreement, or often more interesting, disagreement with specific critics!