Kambakht is an Urdu word which comes from the root Bakht. Bakht means Good luck or good fortune and hence kam-bakht means someone with less good fortune, literally someone unfortunate, wretched.
Though the word actually means wretched, it's many times used as a slang/swearword without much caring for the meaning and hence a common notion is that kambakht means someone who is bad as s/he does wrong.