The setting can also play a huge role. A desolate or war - torn setting like in 'All Quiet on the Western Front' adds to the overall sadness. The soldiers' lives are already so difficult and the constant threat of death makes the story extremely sad and impactful.
Well, for one, the characters. If the characters are well - developed and the reader can empathize with them, then when bad things happen to them, it really hits hard. For example, in 'The Kite Runner', Amir's journey and his guilt over Hassan make the sad parts of the story very impactful.
The themes in a sad story are crucial too. Themes of loss, unrequited love, or the futility of life can make a story sad. In 'Romeo and Juliet', the theme of love being thwarted by family feud results in their tragic deaths, which has made this story one of the most impactful sad stories in literature. The story shows how something as beautiful as love can be destroyed by external forces, and that's really sad and makes us feel deeply for the characters.