The air conditioner was invented by a very clever fellow, Willis Haviland Carrier in 1902. Carrier asked to develop a device that would take away the moisture from a paper factory (Sackett-Wihlems Lithographing & Publishing Company). The moisture that would form during the hot summer months would soak into the paper and cause difficulties when it came to applying layered ink.
Carrier realised that cool air did not seem to carry as much moisture as hot air and concluded that he needed to invent a machine that reduced the temperature of the factory, which in turn would reduce the moisture in the air. He made it so the air in the factory blew across chilled pipes, cooling the air down and reducing the humidity and moisture in the paper.
The air conditioner soon became very popular and now is a necessity for not only those hot summer months, but the cold ones too!