At the dividing point of the night, I will go out into the midst of Egypt... [Bo 11:4]
Rashi comments: At the literal level [p'shat] Moshe informed Pharoah that the plague would start at midnight precisely.
A non-literal [agadic] interpretation is that G-d told Moshe the plague would start at precisely midnight, but Moshe decided not to tell this fact over to Pharoah because he feared that the Egyptian astrologers might err in their calculations of the exact time of midnight. Then, when the plague failed to come at the time they expected, they would come to the conclusion that Moshe had spoken falsely. Therefore, Moshe told Pharoah that the plague would start at 'around midnight'.
Mizrachi comments: The Torah states that Moshe told Pharoah the plague would begin כַּחֲצֹת הַלַּיְלָה. Literally, this means 'around midnight'. However it is unthinkable that G-d should express Himself in such an uncertain manner. Therefore, Rashi understood that כַּחֲצֹת means precisely midnight. This unusual translation was achieved by rendering the word not as a noun but as a verb: ''when the night divides''.
The second agadic interpretation of Rashi solves this problem by explaining that G-d did indeed express Himself in precise terms, but Moshe chose to use a more ambiguous expression, for fear of being misjudged.
Ibn Ezra: The term כַּחֲצֹת הַלַּיְלָה could be rendered 'after midnight' i.e. in the second half of the night [as in Ruth 3:8]
Ramban: Moshe was clearly not trying to tell Pharoah the exact timing of the plague at all, for he did not mention which day the plague would occur. Rather, Moshe was hinting generally that the next plague would cause Pharoah and his servants to arise in the middle of the night.
Perhaps we could argue that Rashi accepted the problem presented by Ramban that the warning of a precise time seems totally superfluous here, as Pharoah was in any case not informed of the date.
Furthermore, we do not find that most of the other plagues were associated with a specific time. Even in those instances when the dates were specified [e.g. before the plagues of death of cattle and hail] the time was not. So, why do we find that in this final plague, an exact time was given?
[One exception to this rule was the plague of hail. Rashi explains that Moshe drew a line on the wall and said that when the sun would reach the line, the hail would fall [Vaera 9:18]. But in that case, there was a reason for giving a time, so that those who ''feared the word of G-d'' [Vaera 9:20] would be able to put their slaves and cattle under shelter before the plague started. In our case, however, there is no practical reason to mention the time.]
Since the time appears to be of no relevance here, Rashi concluded that the reference to midnight was primarily a descriptive statement which conveyed the unique quality of the impending plague.
We are therefore left with a question: the distinctive feature of the plague of the firstborn is that it was carried out by G-d Himself, as verse 4 states: ''I will go out into the midst of Egypt''. But if we would follow the usual translation of the word כַּחֲצֹת [around midnight] then how would the verse convey the unique quality of this plague, that G-d was involved personally? Surely, one would expect G-d Himself to be of the utmost precision?
[In fact, we find that the plague of hail was enacted with extreme precision. So, it would be unreasonable to suggest that the plague which G-d enacted personally would be around a certain time, and thus less accurate than one of the previous plagues in which He was not directly ''involved''.]
Therefore, Rashi was forced to conclude that, at the literal level, כַּחֲצֹת הַלַּיְלָה must be rendered [not as 'about midnight' but] as ''precisely midnight'' i.e. even though this is an unconventional [and thus apparently non-literal translation] it is nevertheless necessary to preserve the basic implication of the text, that the plague occurred at a specific time to express G-d's personal involvement.
However, since this interpretation resorted to an unconventional translation, Rashi felt it necessary to bring also a second interpretation from agadic sources.
Midnight as an Expression of Infinitude
It was explained above that Pharoah was informed of the time of the plague of the firstborn primarily as an expression of G-d's personal involvement. This is highlighted by the comment of Rabbi Yehudah ben Basaira in the Mechilta that midnight is not a definitive moment in time, but rather, a threshold. Thus G-d's revelation at ''midnight'' expresses His true infinitude, how He can be simultaneously revealed in our world that is bound by time, and yet, remain aloof from it.
Source: Based on Likutei Sichos Vol 21 Lubavitcher Rebbe - Gutnick Chumash