The origins of the word bad are unknown. Until about 1700 the word evil was widely used instead.
Of course, in current usage, bad is much weaker than evil and can be use jokingly.
The word "bad" in Farsi (Persian) (pronounced the exact same way as it is pronounced in English) has existed longer than the word bad has been used in English. It is possible that the word was adapted into English during the middle ages through business men traveling on the Silk road.