
Jeremiah J. answered 04/10/19
Science Communication Advisor specializing in Oral Presentations
(Note: I'm addressing this from an science research/academic perspective; I would hope the tactics are universal)
The best advice I have for this question comes from Uri Alon, a systems biologist who also spent part of his life training in theater. All of his advice for giving good talks -- including the question and answer phase -- is about forming connections between the speaker and audience. I would always recommend having this mindset going into a talk; in other words, if you go in expecting to fight, you'll get a fight.
I recommend watching this series (in general) but I'm including the part where he begins to talk about Q&A (it starts around 2 minutes in and ends around 8:30). It doesn't address "that's a good question" in particular, but it may help you get some ideas about why a speaker may say that.
https://youtu.be/OhnSSjQCm4c?t=120
In my own experience, I've said, "that's a good question" more as a verbal tick/reaction (like saying "uh" or "um" or "you know"). But Uri Alon would say it's a way to respect the dignity (or courage!) of the person asking the question.
The giant caveat to this advice is that of course there are question askers who are aggressive (the infamous, let-me-tell-you-what-I-think-before-I-ask-my-question questions). If you watch the video, Uri Alon does suggest diffusing that kind of question; in other words, complimenting the question asker (by saying it's a good question) is a psychological tactic. But on the other hand, if the person asks the question without malice, and you think it's a good question, it will elevate the mood of the room and show that you really are interested in what people have to say.
It's all about understanding and molding the dramatic action, to use his words. It's easy to think of talks as being thrown into a gladiatorial arena, but you often have more control over how it goes than you think. Even the unpredictable parts.
I'm not sure that answered your question, but I hope it can point you in the right direction!