In general "kein" is used with nouns, while "nicht" is used with verbs. Some examples stolen from Handout: Negation with Nicht and Kein:

Since "Hunger" is a noun, the usual negation would be "kein", saying "Nicht Hunger haben" isn't grammatically incorrect, but quite unusual.
Though as always there are examples, where both negations could work well, but with different emphasis.
"Hitzefrei" is a noun as "Hunger" as well (and not even really translatable to english as a single word. The closest english translation I can think of is "a (school) day off due to an extraordinary heatwave").
The questions
Warum haben wir nicht Hitzefrei?
and
Warum haben wir kein Hitzefrei?
would work equally well.
An emphasis from context could be
Die Klasse 6a hat heute Hitzefrei.
Warum haben wir (Klasse 6b) nicht auch Hitzefrei?
In the above sentence emphasis is more on the verb (nicht haben) than onto the noun.
Though
Die Klasse 6a hat heute Hitzefrei.
Warum haben wir (Klasse 6b) kein Hitzefrei?
still would work equally well, but emphasis shifts slightly to the noun (kein Hitzefrei).
The english translations could be
Class 6a got a day off for the extraordinary heatwave.
Why did we (class 6b) not get a day off?
Class 6a got a day off for the extraordinary heatwave.
Why did we (class 6b) get no day off as well?
It seems that's bit of an exception / irregularity, and you can't really apply a strict grammar rule.