There are four Mitzvot, מגילה ,סעודה ,מתנות לאביוניםand משלוח מנות that must be done during the day of Purim. The primary reading of the מגילה is during the day and it is possible that during the time of the משנהthere was no reading of the מגילה at night. The origin of reading the מגילה at night is in the Gemara (Megila 4a) where it is asked why this is the only Mitzva which is done twice. Rabbi Yehoshua ben Levi quotes a Pasuk in Tehillim that says, “my God I will call you during the day and shall you not answer and at night you shall not be silent.”
There is a Pasuk in Yirmiyahu (31:30)הנה ימים רבים נאם ה' וכרתי את בנ"י. According to most of the Meforshim this Pasuk refers to a time in history where there will be a reawakening among the people and a new desire to make a close bond with Hashem. A Pasuk in Esther (8:17) says," ,ורבים ומעמי הארץ מתיהדים there was a sudden awakening during the time of Esther to convert to Judaism.” Later in the Megila, (9:27) it says קיימו וקבלו about the Jews. The Gemara (Shabbat 78b) learns קיימו מה שקיבלו כבר ”they accepted what they had already accepted earlier.” According to this Gemara they accepted the Torah at Har Sinai without any choice and then accepted it again here. According to ירושלמי therefore, you are allowed to learn Esther with 13 Midot just like the Torah. However, all of the other books of Nach are not allowed to be learned, in order to add anything to the Torah. From this we see that there is a connection between receiving Torah and Megilat Esther.
In Shemot (24:11) the Torah describes the scene after Maamad Har Sinai. It says that were drinking and eating. Rashi believes it was a very inappropriate response to Maamad Har Sinai and that Hashem wanted to kill them. However, He did not kill them until Rosh Chodesh Nissan which was the first day of the Mishkan. The Ramban says there must be joy when receiving the Torah and the appropriate way for a person to be happy is to eat and drink. Therefore the Ramban says that when the Pasuk said that they ate and drank it, it was appropriate, and that it is this Pasuk which is our source for making a Siyum. Additional support is gathered from the Gemara (Pesachim 68b) where there is a dispute between Rabbi Eliezer and Rabbi Yehoshua. Rabbi Eliezer says that on a holiday you should devote all of your time to God (by Davening or learning) or spend all of your time for yourself (by feasting and relaxing). Rabbi Yehoshua says that half of the time should be devoted to God and the other half should be devoted to yourself. The Gemara says that everyone agrees that on Shavuot you have to eat something because it was the day, on which the Torah was given. Therefore, we can establish that there is a connection between the Torah and having a feast.
Another connection between food and torah is brought by the Bait Halevi with respect to eating on Erev Yom Kippur, because we received the Oral Torah on Yom Kippur. Therefore, we celebrate receiving the Oral torah on Yom Kippur by eating on Erev Yom Kippur, since eating is forbidden on Yom Kippur itself. The same thing can be learned by Purim, because on Purim the Jews reaccepted the Torah. The reading of the מגילה on Purim represents the Oral Torah, because it is the only thing that can be read by heart. As a result, the מגילה is read twice to demonstrate this concept of קיימו מה שקיבלו כבר (that they accepted what they accepted before) and twice for the Oral Torah and the Written Torah.
Another explanation is one given by Rav Soloveitchik zt”l, who says that reading theמגילה at night is not related to Purim, and is related to the previous day of Taanit Esther. He says, that each of the other fast days which are observed throughout the year have an aspect of mourning, since in some way people died. However, Taanit Esther is an exception, because nothing terrible happened on that day. As such, the fast has a totally different purpose, which is why there are so many leniencies on that day. There are some opinions that say that if you miss one of the other fasts because of sickness, or because you forgot that there was a fast, that you should make up the fast on a later date. However, there is no opinion that says that, this rule applies to Taanit Esther. Therefore, the reading of the מגילה on Purim day is related to publicizing the miracle, and the reading of the מגילה at night is to reminding us that Hashem listens to our prayers. That is why the Shulchan Aruch holds that it is preferable that you fast when reading the מגילה at night.
-Adapted from a Shiur given by Rabbi Yosef Adler at TABC.