Be cruel to your characters.
Let bad things happen to good people. Let your characters try and fail. And try again. And fail again. Let them be betrayed in the worst possible way. Let them betray others because they have no choice. Force them into situations that make them uncomfortable. Force them to argue or fight or bargain their way out. Drive them to the brink of insanity. Push them over the edge. Take everything away from them. Let them realize what they’ve lost.
Be kind to your characters.
Let faith and perseverance win out. Let love be enough. Let the Sun dry up the rain. Give them friends who will never leave. Let someone save them before the axe falls. Acquit them of false accusations. Give them the strength to stand up again. And again. When they’ve lost hope, give them something to believe in. Remind them there’s good in the world. Remind them there’s good in them, too. Surprise them. Make them laugh until they cry. Teach them that they can’t be broken.
Most importantly: balance.
Even the darkest tragedy has its moments of light; if your reader has no hope that things will get better, if your character doesn’t learn or become stronger for their suffering, the story becomes meaningless pain. Likewise, not only is it unrealistic for a character to go through life never encountering conflict or sadness, it’s boring. Not every conflict has to be life-or-death in order to be meaningful. Give your characters and your plots high points and lows; just make it real for them.