It is mainly used to evoke the "horror" and "dread" of the novels, but it also has a deeper meaning.
Usually, there are decaying and ruined scenery which is supposed to indicate the world was once thriving, but now it isn't.
Sometimes the setting is one that used to be appreciated and cared for meticulously, but now it is decaying and falling apart much like the lives of the characters or the storylines.