In this expression, "badly" acts as an intensifier -- it strengthens the word "need" and emphasises just how much they are needed. In other words, "We need them very much", "We really need them".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.