Potted history.
With available technology in most of the 20th C, d.c. traction motors were better than a.c. So diesel electric locomotives were developed with d.c. generators and d.c. motors. (At least in the U.S., General Electric is the key player: power electricals and control systems evolved from GE's pre-WWI railcars, with improved versions on the first successful diesel-electric switchers and EMC's gas-electric railcars in the 1920s. Alco diesels used almost exclusively GE electricals -- a few "Hi Hood" switchers in the 1930s got W'house -- until Alco left the market at the end of the 1960s. EMC bought electricals from GE and W'house: after it was taken over by General Motors in the 1930s it developed its own electricals, based on GE designs.)
Big d.c. generators are problematic, so when solid-state rectification became feasible in the 1960s, locomotive builders switched to using -- on all 3,000hp and up units, and increasingly as time went on for lower powered units -- a.c. generators with rectifiers to provide d.c. current to the traction motors: this change was made by EMD with its 40-series models (introduced 1966) and by GE with the Alco C630 (introduced late 1965) and on some GE U28B and U28C units in 1966.
Further developements of solid state electricals and controls able to provide variable frequency a.c. allowed the use of synchronous a.c. traction motors. The locomotive has an a.c. generator, producing a.c. at a frequency determined by engine r.p.m., with the current being rectified so as to feed d.c. to the invertors which then produce a.c. at a frequency determined by the desired locomotive speed to feed to the traction motors. This technology was introduced in Europe (British experimental in the 1960s, German prototype in the 1970s) and in the U.S., by both EMD and GE, in production models in 1993 and 1994. Initially EMD and GE offered both models with d.c. motors and models with a.c. motors, but the advantages of a.c. have led to increasing use: I think all high horsepoer units in the past coulple of years have had a.c. motors.