Willis Haviland Carrier invented the first electrical air conditioner in 1902. The first air conditioners where used to cool air for industrial processing. It was not until the 1950's that residential air conditioning sales took off.
A 19th century British scientist found out that if you use a compressor to liquify a certain gas it would chill the air when a certain amount of ammonia was allowed to evaporate. Willis Haviland Carrier used this to make the first air conditioner. Look here for more information: http://wiki.answers.com/Q/Who_invented_the_air_conditioner