Using "bad" is acceptable in an informal context, eg. I want it so bad, which means I want it so much. Actually, for convience purpose, they tend to use "bad" in everyday conversation. But you have to be careful in formal writing, in which case "badly" is the grammatically correct choice.