Kinda. According to my textbook, んだ (or んです) creates “harmony and shared atmosphere”, though doesn’t really explain why – it kind of seems like it creates harmony simply because everyone knows that’s what it means.
It’s also used to elicit or give further information – for example, あまり食べないんですね means “you don’t eat much”, but also implies “and why not?” without being so crass as to ask directly. In question words, like 何してるんですか or どうしたんですか it acts to soften the question and make it more friendly.
In text (and occasionally in speech) it becomes のだ/のです, and sometimes even just の, as in どこ行くの?