Of the towns mentioned in the linked article, Dixville Notch, Millsfield, & Hart's Location, only Dixville Notch seems to have maintained this tradition continuously for a significant time period; from 1960 onwards. I'm not sure how much predictive power can be assigned to communities with just a handful of votes, however Wikipedia has collated tables showing their accuracy compared to the state and national result.
?: In 2012, both Romney & Obama received five votes from Dixville.
These tables don't show the results from midnight-voting towns before 1960, so I've had to look a little deeper for those. This article provides a good round-up: in 1948, Hart's Location gave Dewey eleven votes to Truman's one vote; a miss. In 1952, three votes for Eisenhower compared to another one for Truman; a hit. Millsfield also voted in 1952, giving eight votes to Eisenhower, another success.
I haven't been able to discover any further returns from this earlier period, aside from a reference to a 1960 UPI article with the headline "5 'Early Bird' Towns Back Nixon, 49-8". I haven't been able to track down the full text of this article, but this suggests that these towns were all unsuccessful at predicting the national race, as Nixon went on to lose to Kennedy.
None of these towns can ever really be used to accurately predict the course of the election, as extrapolating the votes of fewer than a hundred people from a few tiny municipalities in one particular state to draw conclusions about a nation as a whole is clearly flawed. If the midnight-voting towns grew to a size significant enough to produce results that could be extrapolated in a meaningful way, they would likely no longer be midnight-voting towns.
The law appears to have been at one time that municipalities with a population lower than 100 could decide on when to open and close their polls; many news sources, including Hart's Location's own website, state that "New Hampshire law allows towns with fewer than 100 residents to open the polls at midnight and close them as soon as all registered voters have cast their ballots". However, reading through NH's current election law, I believe the relevant statutes are NH Rev Stat § 659:3 & 3-a, which state:
659:3 Early Closing of Polls. – Notwithstanding any provision of law
to the contrary, the voters present at the polling place may vote to
close the polls at any time that the number of those who have voted
plus the number of absentee ballots received at the polls equals the
number of names on the checklist.
659:3-a Early Closing of Polls in Dixville, Hart's Location, and
Millsfield. – The polls may not be closed pursuant to RSA 659:3 in
Dixville, Hart's Location, or Millsfield until every person domiciled
in the town who is not on the checklist has been contacted by the town
clerk to see if they wish to register to vote prior to the closing of
the polls.
Given that in order to close the polls early, every single resident in the specified three towns has to be contacted individually, or else a number of ballots equivalent to the number of registered voters needs to be cast, it is unlikely that this would be logistically possible in towns of larger populations.