During the late 1800's there began some serious competition between 2 major electrical companies, they were Westinghouse and Edison. Because Edison was infamous for his inventions and contributions for DC current, DC was the first generator used to power the homes in a town. Because of Edison's success the majority of people sided with Edison as opposed to George Westinghouse with his proposal for an AC distribution system. Edison was extremely against the use of AC current claiming that its use was dangerous to society. He even went to extreme measures by setting up demonstrations of using animals and electrocuting them. Westinghouse recruited Nikola Tesla after his defection from the Edison party because of Edison's lack of interest of AC. This was an important moment as they were now able to become serious contenders for the Edison party. With Tesla's skill and Westinghouse's resources, they were able to develop the polyphase motor, which showed promising results. Westinghouse's big break came when a competition came up in Niagara falls in 1886 where many inventors entered in their attempt to present a plan to power the city. Naturally the two main contenders where Westinghouse and Edison, but it was George Westinghouse who eventually ended up being the winner and it was Westinghouse's AC system that was used.
As we know now AC is utilizes better technology. DC suffers from inefficiencies of power loss over longer distances. Whilst it may work fine for a relatively small area the large distances suffer massive amounts of energy loss in the form of heat (which will also mean the use of thicker wires to counter this and more difficulty in setting it up). The main reason AC is advantageous is the ability to use transformers. Transformers allow the power company to "step up" the voltage of the power produced at the generator, transmit the power over great distances at high voltage, and then "step down" the voltage before delivering the power to the home.