The Rama (Orah Haim 692:4) writes that one is not permitted to eat prior to hearing the Megillah, even if one is very hungry from the fast of Ta’anit Esther. By eating, one may become occupied with other affairs and may forget to hear the Megillah. The Magen Avraham (692:7) compares this to the prohibition on eating before other Mitzvot and in those cases, the restriction is only on a meal of aKabetza or more. However, regarding amounts less than this, or foods that do not comprise a Halachic “meal”, such as fruit, one would be permitted to eat. Nevertheless, the Magen Avraham rules stringently and says that even tasting a small amount of food is not permitted before hearing the Megillah. Rabbi Ben Zion Abba Shaul (Or LeZion vol. 4, ch. 54) rules like the Magen Avraham, but says that in a case of great need, one would be able to taste some food prior to the Megillah. Rav Ovadia Yosef (Yabia Omer, vol. 9, § 67) says that anyone is permitted to eat so long as it is not a Halchically-fixed meal, that is, a Kabetza(roughly 56g) or more of bread or other grain products.
There are situations in which the Megillah is read much later than Tzet HoKochavim and fasting past that time may prove quite burdensome. In such a case on can rely on the Aruch HaShulhan (652:5), who says in regards to theMitzvah of Lulav, one is permitted to drink water or a hot beverage. The Mishna Berura (692:16) offers another solution, which is to appoint a Shomer, or a person who will ensure that one is reminded about the Megillah. Although the Mishna Berura refers to someone who is weak or sickly, Rabbi Yosef Sonenfeld (Shalmat Haim) says that even a healthy person could appoint a Shomer, as long as it is in the case of the Megillah being read at a late hour.
Summary: One is not permitted to eat before hearing the Megillah when it is read right at nightfall. There are leniencies for the infirm or if the Megillah is read later in the night.