Trafalgar Square was built on the site of the Crown's stables. John Nash, then reshaping the West End, was asked for a design, and Parliament approved it in the Charing Cross Act of 1826. William Wilkins, architect of the new National Gallery, was made responsible for the square's design.
Listen for the rest of the story. In the app there is a longer version too, for when you want to know more.