Es geht (it goes) ihm (for him) schlecht (badly)--literal translation.
Think of the english saying "how's it going?" b/c it is the equivalent of "Wie gehts."
However in english one would usually say "things are going badly" or "❤❤❤❤'s not good" (for a colloquial saying.) It seems important, when translating, to not always give a literal word for word translation. Instead, say what is meant in the way one would say it in English--one would not usually say "He is bad" in english. One would say either "he's not feeling well" or "things are bad for him right now" or perhaps "he misbehaves" or "he has behavioral problems"--if 'bad' is to mean not behaving correctly. However, in German, if we were saying an individual was behaving badly-I think-the accusative would be used, not the dative--as we would be attributing properties to an agent rather than describing the effect of actions on an agent (action being "bad going" for the the agent "him.")
But I do think some explanation of when, and why, to use "krank" rather than "schlecht" is in order. When I think "unwell" I think of physical illness specifically. Whereas 'not good' could mean anything from money to spousal problems. P.s. trying to contribute more to the community while working on the dative concept. pls correct any mistakes/misunderstandings. Hope this helps someone.
UPDATE: this doesn't necessarily explain why schlecht=ill, but it does shed some light on complaining and describing bad feelings in German--it is both funny and informative: http://yourdailygerman.wordpress.com/2014/03/25/german-bad-mood-vocabulary/#more-5855