For elections where the totals for each elector were used (1824, 1916, 1932-56), the mode of each party slate was used. For 1960, the high elector (for Kennedy on the Democratic, not unpledged) was chosen for each slate. For 1964 to 1972, when each elector was elected separately, one of the electoral contests was chosen. Starting in 1976, the short ballot was used, and the totals thereof are used.
Alabama was admitted to the Union on December 14, 1819. For reasons unknown to me at this current moment, it was decided that, in 1820, the electors would be chosen by the legislature. There was no particular partisan distinction in the balloting. In 1824, there were some votes for a slate of electors pledged to John Quincy Adams, but his support quickly faded, and by 1832, the only opposition to the Jackson slate was another Jackson slate.
The first properly contested presidential election in Alabama was in 1836, and the Whigs maintained at least 40% of the vote in every election up to 1848. They tended to be stronger in the Black Belt and surroundings, while the Democrats tended to be stronger in the north of the state.
After 1850, the Democrats grew in strength, going from over 60% in 1852 to almost 70% in 1860. Their opposition, though changing in labels, still kept the same vague area of increased strength in the center of the state.
At the beginning of this period, the Republicans were somewhat dominant, with strength in the Black Belt. The Democrats eventually seized control back, however, and the Republicans slowly declined. Until the rise of the Populists in 1892, the southeast was the strongest region for the Democrats; during the 1890s, the Black Belt became the Democrats' strongest region.
In 1901, the Alabama Constitution disenfranchised many blacks and poor whites, plunging the state into unquestionable Democratic dominance. Only nine counties were ever lost by the Democrats during this period (with the exception of 1928), all of them in the north of the state. The only time Alabama's vote was up for question was in 1928, where opposition to the Catholic Al Smith caused Hoover's Republicans to lose by under 3% of the vote.
This period was essentially a repeat of the previous one, but even bluer; only Winston County ever voted Republican during this period. The replacement of Truman with Strom Thurmond did not seem to noticeably affect the vote in the state compared to 1944.
During the first half of this period, the Republicans grew in strength, even reaching over 40% of the vote in 1960. The north of the state didn't particularly change, with the Tennessee Valley quickly becoming the most Democratic part of the state as the Republicans became anywhere near competitive in the south.
The second half of this period is characterized by three landslides in a row; while Goldwater's rout of the unpledged Democrats in 1964 vaguely conformed with previous trends, the only trend that can be gathered from Wallace and Nixon's back-to-back victories in 1968 and 1972 is that the victor was most opposed by the national Democratic nominee in the Black Belt, though this opposition was split between two electoral slates pledged to the same candidate.
Carter's victory in 1976 was the last time Alabama has voted Democratic in a presidential election, and the Republicans have only gotten stronger since. The Black Belt is the biggest Democratic stronghold, while the north has faded into the Republican sphere over the last 40 years. Since 2000, the only non-Black Belt county to vote Democratic has been Jefferson County, home to Birmingham.