It roots go far back, to biblical times. On the outskirts of today's Modi'in are the archeological remains of its ancient counterpart, a settlement built during the Maccabean era that was destroyed by the Romans during the time of the Jewish revolt.
Sorry, but the town is not Biblical, as the Maccabees don't appear in the bible. Due to the success of the Maccabean revolt, we celebrate Chanukah, but because the regime later became corrupted and so deeply assimilated into Hellenic culture, the book of the Maccabees was excluded from the Tanach (the Jewish Bible.) Furthermore, the ruins found on Modi'ins outskirts are not those of ancient Modi'in. Most archaeologists have told me that biblical Modiin was located several kilometers to the south, where route 3 and route 1 intersect.
The present Modi'in is located on a hilly region overlooking the Ela Plain, where according to the Bible, David slew Goliath.
Again, wrong. The Ela plain is about twenty kilometers to the south, south of even Beit Shemesh. Modi'in sits on the edge of the Ayalon valley, where the moon stopped as Joshua and his biblical warriors destroyed the Canaanites during the Battle of Giv'on.