In the late 1800s, Nikola Tesla and George Westinghouse battled against Thomas Edison over whether the United States' electric plants should generate alternating current (A/C) or direct current (D/C). Tesla developed 40 patents for A/C technology, which Westinghouse purchased. Not wanting to lose his D/C royalties, Edison continued promoting D/C technology, which lost out in the end because of A/C's superiority over D/C current.
No Need for Matching Voltage
A D/C generator must produce voltage at the level at which it will be used. A/C has the advantage of allowing you to convert the current to a different voltage using a transformer. Transformers work with A/C only, not D/C.
Travel Over Longer Distances
A/C has the advantage of travelling over long distances with less loss of power than D/C. Transforming the current to a high voltage reduces the current, which in turn reduces power loss. This can be seen from the formula P=R*I-squared, where P is power loss due to resistance, R is resistance, and I is current. Because I is squared in the power formula, decreasing I a little (by increasing the voltage) decreases the power loss a lot.
A/C generators have the disadvantage of requiring transformers, which complicates the circuitry. They must be designed so that the higher voltage on one side doesn't discharge (arc). High voltages are not generated efficiently, so low voltages are generated and the voltage has to be transformed to a higher level for long-distance transmission.
A safety-related disadvantage of A/C is the increased danger of electric shock due to the use of higher voltage for long-distance transmission. This is why long-distance transmissions use power lines kept high up off the ground.