Both are correct and have the same meaning, ( more or less )
The difference between these two sentence is the grammar.
Ich / bin / hungrig
Subjekt / Verb / Adjektiv
Ich / habe / Hunger
Subjekt / Verb / direct object accusative (Akkusativobjekt).
Do note that "Hunger" is a Subject, and therefore capitalized.