Rather than answering the question and repeat what others have said better than myself, I'd like to add a few comments for when people apply these answers when they encounter similar situations.
1) Context matters
There's a big difference between a student who shamelessly begs/whines for a better grade in all their classes and the student who did poorly because of something outside their control (e.g. assault). Insofar as we know the context of a given situation and have the power to be flexible, we must not treat all cases identically; doing so would be an injustice to the student.
(It's important to note that the above case is different than many (most?) other cases in that the student admitted to doing this in all their other classes. We can afford less grace for such a student.)
2) The approach of your response matters
Your approach depends on what the student is saying or asking of you. For the students who are whining for a better grade without any justification, a simple, yet firm, "no" may suffice. Other students may be asking why they received the grade they did, and then you should explain why. (If you do, a brief explanation is usually sufficient.)
Typically, your response should be clear and concise. If they have questions beyond what you said in your response, they can ask in a follow-up email. Avoid being too standoffish or defensive when it isn't warranted.
Be professional. Don't be overly congenial (which students may mistake for favoritism, or worse), but don't be antagonistic, either.
3) Compassion matters, but use judiciously
Usually, teachers do not know what baggage their students are dealing with. Some students are more sensitive than others, and they may need a more compassionate response.
It's possible to validate some of their complaints but still be firm. For example, it might be okay to say that you know the student is smarter than is reflected by their grade, but that they didn't demonstrate their knowledge during the class. In other cases, you could say that you know how hard it can be to balance two jobs and taking classes, but that the grade they earned is a reflection not of their overall effort in life, but rather just their performance in this class.
Avoid making judgments about the student's situation. Avoid blaming the student for their situation. If the student put themselves in their situation, you can let them learn from it without heaping blame on them. (I've heard stories of teachers telling students that they're a failure and should drop their program or major. This can be very damaging to a student's psyche. Even when warranted, this is rarely a teacher's responsibility to say.)
Also avoid being too kind or soft, as the student may try to take advantage of this in further emails, or tell their friends to do so in the future. You don't want to have the reputation of being a pushover.
4) Fairness matters
Be very careful about making exceptions for one student that you are not able or willing to make for other students. Everything else equal, making an exception for one student is not fair to the other students.
If you are willing/able to let one student make up some work after the semester, be sure to allow other students to do the same (barring special circumstances).
5) Precedent matters
If you decide to be flexible for one student in one thing, realize that you are establishing a precedent that you may be held to in the future, either by students or by your institution.
This is partly why rubrics are so useful: they set a precedent and expectation for graded work. If a student claims you graded an assignment unfairly, you can point out on the rubric where they lost points.
6) Knowledge matters
Know the policies and options at your institution, and know what situations fit with these policies and options. For example, some schools allow teachers to give a student an "incomplete" mark rather than a letter grade for special circumstances.
If you know that it's too late to change a grade (e.g. institutional policy), you can tell this to your student and point out that if they were concerned about ____ that affected their grade, you could have worked out a solution if they had told you before the deadline.
If a student persists in pestering you, it's good to know whether you are obligated to respond to them (usually you aren't), and to know at what point to report them for harassment.
Finally, if you really aren't sure how to handle a situation, it is useful to know where you can get help.
Be clear and concise in your response. Be firm, but don't be a jerk. Make sure you take context into account when responding. Know what options you have in a given situation.