I'm not sure how well this observation generalizes among other people, but I think the atmosphere of a game is determined primarily by its soundtrack rather than by its writing. If I remember how atmospheric some game was, I usually remember its soundtrack (i.e. Desu Ex, Shadowrun: Dragonfall, Heroes of Might & Magic II / IV, or parts of Planescape: Torment) - but I don't necessarily remember the writing (maybe for the better - especially in the case of Dragonfall). On the other hand, I don't remember anything related to 'atmosphere' in games with mediocre soundtracks, like Knights of the Old Republic 2. And, if a game doesn't have any score, I practically ignore the ambiance of the world; for example, I didn't care at all about the world changing from Might & Magic Book One (where humanity was living underground, hiding from dragons and other vicious monsters) to Gates to Another World (where you genocide peaceful goblins, search for Elvis in dungeons, or are casually told meta-information by half the characters).