The first time a U.S. presidential election was held on the same day in every state was on November 7, 1848. According to the Library of Congress:
“In an effort to address the problem of voter fraud in presidential elections, Congress passed legislation in 1845 requiring the simultaneous selection of presidential electors in each state. Prior to the enactment of this law, states selected presidential electors on different dates. The new law stipulated that presidential electors be selected on the ‘Tuesday next after the first Monday in the month of November of the year in which they are to be appointed.’ The 1848 election was the first presidential election in which Americans in every state voted on the same day.
“In 1872, legislation was passed that moved election day for the House of Representatives to the same Tuesday in November. The act was amended to include Senate elections after the Seventeenth Amendment was enacted.”