The short answer
The White House got its first air conditioning in the late 1920s, according to most accounts. A much more complete system came with the major rebuilding of the building in the late 1940s and early 1950s. Sources differ on the exact years and on what each installation covered, so check an official source if you need a precise date.
Cooling the mansion before air conditioning
Like other large houses of its time, the White House relied on open windows, fans, shade, and the thick walls of the building to stay cooler in summer. Summers in Washington, D.C., are hot and humid, and the building was often uncomfortable in the hottest months.
The late 1920s installation
Most accounts date the first air conditioning to the late 1920s, a period that covers the Coolidge and Hoover administrations. Early equipment of that era was limited in scope, and accounts describe what it cooled in different ways. It was far from the whole-house system people think of today.
The rebuild in the early 1950s
From about 1949 to 1952, the White House was largely rebuilt under President Harry Truman, because its interior structure had become unsafe. The work updated the building’s systems, including heating and cooling, which made a fuller air conditioning system practical. Much of the later cooling story comes from this period.
Why it took so long
Air conditioning a building as large and old as the White House is a much bigger task than cooling a single room. It needs large equipment, ducts routed through thick walls, and a lot of electrical power. Those costs and engineering challenges help explain why the work came in stages rather than all at once.
Where to check the details
The White House Historical Association publishes material on the building’s history and is a good place to start. Because specific dates and details vary by source, treat any single date with some caution until you have checked the official record.