On Feats on Prerequisites says
Some feats have prerequisites. Your character must have the indicated ability score, class feature, feat, skill, base attack bonus, or other quality designated in order to select or use that feat. A character can gain a feat at the same level at which he gains the prerequisite.
That is, first, a creature must meet a feat's prerequisite to select the feat at all. Thereafter, a creature need not always meet that feat's prerequisite to keep the feat, but the creature must meet the feat's prerequisite to realize the feat's benefit.
Further, Character Advancement on Advancing Your Character says, "A character advances in level as soon as he earns enough experience points to do so—typically, this occurs at the end of a game session, when your GM hands out that session’s experience point awards." Thus if a druid meets the prerequisite for the feat Improved Natural Attack while using the supernatural ability wild shape right as that druid's about to advance a level, the druid may meet the prerequisite for the feat Improved Natural Attack and he can select the feat, but the druid will only be able to make use of the feat when he meets the feat's prerequisite… so usually not while in his natural form.