In the 2016 election, the polls closed in Indiana and Kentucky at 6pm local time, but in some other states, notably New York, polls are open all the way to 9pm.
Why do the poll closing times vary so much from state to state, and why don't the poll closings just end at the same time locally, and just go west state-to-state?
If not for a law passed by Congress, elections for Congress and the president would not necessarily be on the same day.
Presidential elections have always been somewhat regular because the Constitution permits Congress to set the meeting date for electors in each state, and the time of appointing the electors. Also it is a national election, because Congress counts the electoral votes, and potentially chooses the president and vice president. In the 1840s, when all States but South Carolina were appointing their electors by popular election, Congress set the first Tuesday after the first Monday in November as the time for appointment of electors (technically, appointment of electors occurs on election day, even though it is not necessarily known who was appointed). The appointment date was set in the odd form so that it would be a uniform period from the elector meeting date in December. The lapse between the election and the meeting date permitted determination of who won the election - which would require sending local results by horseback or stage to the state capital, sending notice to the electors that they had been appointed, and travel time to the meeting of electors. Tuesday was chosen because that was when New York held its elections.
The uniform election date for Representatives was not set until 1872, and not fully implemented until 1960. Before 1872, representatives were elected over a period of more than a year. Some States elected them at the time of their State elections, while others preferred to have separate congressional and separate presidential elections. Congressional terms started on March 4 of odd-numbered years, but typically the first session did not convene until December. Holding an election in November, prior to the second session of the preceding Congress is almost moronic.
An election in November could have turned out most incumbents. The
losers would then go to Washington in December and meet for four months, while the representative-elects would not go to Washington until December of the following year, almost 13 months after their election.
Many states held their congressional elections in the odd year, even after the start of the term. So long as Congress did not meet until the following December. A large share of these States were in the South. This was not really a problem before the Civil War. Many Southern states had not elected their representatives before the war started, and never did elect them. Lincoln did not call the Congress into special session until July of 1865.
In 1872, as part of the Apportionment Bill, Congress set the congressional election date to match the presidential election. Some of this was done to impose northern hegemony, since many states were not represented, and during the War and Congressional Reconstruction, the Congress had got used acting as a national legislature.
Remember that the Continental Congress was styled 'United States of Congress Assembled', that is the States (plural) had come together (congressed) in a single assembly to take collective actions. Representatives were representing their States. This was particularly true of Senators who were chosen by their respective state legislatures.
To impose a uniform standard is in effect the representatives from State X telling representatives from State Y how they should have been elected and calls in question the legitimacy of their election.
Representative X: "Hey you farm boy!, Yeah I'm talking about you, Hoosier. The one with the cow lick. And you too, Kentucky girl, in your flour sack dress" is unlikely to gather support.
I've never really understood why some States keep the polls open until 9 pm.