Right at the start of the book, before anything tragic has happened, Tess expresses her belief that planet earth is a "blighted star". The observation is significant because it tells us a lot about Tess's outlook, and sets the tone for what is to come. For all her youth and beauty, Tess has learnt to expect the worst from life's twists and turns, a view which is shortly to be reinforced by Prince's tangle with the morning mail-cart.
This pessimism echoes Hardy's own tragic outlook, which permeates nearly all his novels. Disillusioned with Christianity, Hardy identified with the works of atheist philosophers such as Schopenhauer, and saw the universe as an indifferent and unfeeling place where the odds were stacked against individual happiness. This view colours both his descriptions and his plots, in which missed chances and cruel coincidences frequently scupper his characters' hopes.
Thomas Hardy's Wessex covers most of the southwest of England. It started out as a fictional rendering of the area of Dorset in which Hardy grew up, but expanded during his writing career to encompass the counties of Devon, Wiltshire, Hampshire, Somerset, parts of Berkshire and Oxfordshire. The furthest north-easterly point is Oxford, which Hardy renamed "Christminster" in his last novel, Jude the Obscure.
Like Christminster, most of the places mentioned in Tess of the D'Urbervilles correspond to real locations. For example, Sanbourne, where Tess and Alec put up at a guesthouse in the closing chapters of the book, is the seaside town of Bournemouth. This renaming gave Hardy the freedom to borrow elements from real-life towns and places without being obliged to portray them exactly as they were. You can find a comprehensive list of Hardy's place names and their real-life equivalents here.
Hardy's Wessex is a deeply nostalgic place. Although Tess of the D'Urbervilles was published in 1891, it is set some years earlier, before mechanisation and the coming of the railways had fundamentally altered the countryside. The old traditions are being eroded on every side, from the dialects spoken by the villagers to the methods used to gather the harvest. Hardy records these dying customs in such loving detail that for many people (and many tourist gift shops in southwest England) his name is synonymous with rural life in pre-modern Britain. In fact, Hardy's views on modernisation are probably more complex than most people give him credit for; while he clearly regrets the loss of the old ways, he also makes the naivety and ignorance of many of his rural characters a pivotal factor in their downfalls.
Along with the massive changes wrought by the Industrial Revolution, which saw many rural workers abandoning their traditional ways of life to seek work in urban factories, the nineteenth century was a time of rigid, and often deeply hypocritical, moral views. Chief among these were the social conventions regarding sex, which required chastity from unmarried women yet turned a blind eye to young men's sexual experiences. Women who broke these codes, as Tess does, became social outcasts.
The situation was not helped by Queen Victoria, who had particularly sheltered views on sex. Asked to ratify a law making lesbian sex illegal, the queen refused to accept that such things ever took place and threw the legislation out, with the strange consequence that while sex between men was illegal in England until 1967, sex between women was not.