The White House is the seat of the executive branch of the central government of the United States. It is where the President lives and works.
History (Original Timeline)
Prior to X2: X-Men United
During a tour of the White House, a brainwashed Nightcrawler tries to assassinate the president in the Oval Office, successfully defeating the Secret Service detail using his teleportation. Before he can carry out the assassination, he vanishes at the last moment when a disabled guard is able to shoot him in the arm. The incident stirs up anti-mutant feelings around the country.
William Stryker, a retired special forces officer and the president's Secretary of Domestic Security and Defense, visits the president, mentioning how close the teleporter had gotten to killing him. Stryker then gets approval for an attack on the X-Mansion, which he discovered by interrogating the imprisoned Magneto. Mystique, in the disguise of the late Senator Kelly, tries to object, but fails.
Later on at the White House, just as the president is about to make a televised speech on the mutant issue, he is interrupted; everyone in the room freezes except the president...and the X-Men. Professor Xavier presents him with information taken from Stryker's personal files. The team then leaves, allowing the president to begin his speech and review the files.
Almost two years later, the new president, who was elected on a platform that was more conciliatory towards mutants, creates a new executive department and cabinet position to deal with mutant issues - the Department of Mutant Affairs. Dr. Hank McCoy, a long-time mutant rights advocate, is appointed as the department's first Secretary.
However, the president still had to deal with the omnipresent threat posed by Magneto and the Brotherhood of Mutants. He was often in the White House's Situation Room conferring with his Secretary of Defense Trask and various military officials as to how to deal with mutant terrorist groups.
Following the Brotherhood's attack on the prison convoy carrying Mystique, they discover and make public the fact that Worthington's cure was being weaponized. Upset that mutant policy was being made without his input, McCoy resigns his cabinet position while meeting with the president in the Oval Office.
As the Brotherhood begins to carry out attacks on locations administering the cure to volunteering mutants, the president authorizes that the cure be further weaponized, resulting in U.S. National Guard troops being re-equipped with plastic weapons (as a counter-measure against Magneto specifically) loaded with cure cartridges.
Following the incident on Alcatraz, the president announces in the White House's Rose Garden that Hank McCoy will be appointed as America's U.N. Ambassador, ostensibly for his service in combating the Brotherhood's threat.
History (Revised Timeline)
Prior to X-Men: Days of Future Past
In 1972, Bolivar Trask met with President Nixon in the White House for an 18 1/2 minute meeting that was wiped from the tapes in the Watergate incident.
After the incident at the Paris Peace Accords summit in 1973 with Magneto and Mystique, Bolivar Trask travels to Washington to present the President with a solution to the mutant problem; the Sentinels after previously being denied a grant to fund their development. Nixon agrees to approve their development, so long as their existence is not denied by the government.
The following day, Nixon publicly unveils the Sentinels on live television on the White House lawn, only for Magneto to gain control of them (having sabotaged their non-metal foundations with trackwork) and begin firing on the individuals present for the unveiling. Nixon and his Presidential administration head into the White House, where they enter a secure bunker underneath the Oval Office for protection. Magneto pulls the bunker out of the White House with his powers, damaging the South Portico in the process. At the end of the film, back in 1973, when Wolverine is fished from the Potomac River (earlier on, Magneto impaled Wolverine with rebars and hurled him into the river), a newspaper headline announces that the White House will begin extensive repairs.