The meaning of badly that you're talking about is
Badly
adverb
2 : to a great or intense degree
https://www.merriam-webster.com/dictionary/badly
Thus, we beat them and we beat them badly have distinct meanings. In the first case, you might be describing a game you won by a single point; in the latter, a game that was a total blowout, you won by 50 points (or whatever makes sense for that game).
This use of badly sometimes has negative connotations. For example, if a steak were "badly charred" that would mean that it had been burnt to a high degree, and that that degree of burntness was too high - whereas "the steak was charred" has a more neutral meaning (at least to people who sometimes enjoy their meat to be a little burnt).
In other contexts, badly can be entirely neutral. For example, "I badly want to see that movie" has no negative connotation. It means almost the exact same thing as "I really want to see that movie."