Though they may seem alike, bad and badly are actually two entirely different words. Bad is an adjective, while badly is an adverb.
The word bad often follows a linking verb and state-of-being verbs like taste, seem, smell, remain, become, feel, and grow.
On the other hand, the word badly is used to modify action verbs.
Examples:
Pollution is bad for coral reefs.
Local communities think badly of tourists who litter beaches and similar tourist places.