Post History
When it serves the plot. That's really the only reason you do anything in a plot-driven story. If the death serves the plot, do it. If it doesn't serve the plot, then don't. Don't do it for shock...
Answer
#4: Attribution notice removed
Source: https://writers.stackexchange.com/a/37780 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/37780 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
When it serves the plot. That's really the only reason you do anything in a plot-driven story. If the death serves the plot, do it. If it doesn't serve the plot, then don't. Don't do it for shock value, or purely to motivate another character (that's called "fridging," which you can read about on [TV Tropes](https://tvtropes.org/pmwiki/pmwiki.php/Main/StuffedIntoTheFridge)), or because it's trendy or edgy or GRRMartin or J Whedon does it. Do it because there is a reason which makes sense for your plot to move forward.