Whenever I watch an old movie where they take a trip to England in the early 20th century the performers all wear these costumes decorated with white dots in patterns that outline the clothing. An example would be everyone in Angela Lansbury's number "How'd You Like to Spoon With Me?" in Till the Clouds Roll By. What was the context for these costumes? Where did they come from?
First of all, kudos to you for watching my kind of movie. The outfits you're talking about are those of the "Pearly Kings" and "Pearly Queens", suits of dark cloth decorated with pearl buttons - usually arranged in meaningful symbols reflecting an individual's history or personality all over the coat and trousers (or skirt, in the case of women). These also turn up in the "Supercalifragilisticexpialidocious" number in Mary Poppins! It's difficult to speak definitively on the Pearly Kings as much of the information about their history comes down through oral tradition and sometimes contradicts itself.
While the first Pearly/Pearlie King is thought to be Henry Croft, a municipal street sweeper, the style itself originated among costermongers (sellers of fruits and vegetables). Costers were noted in the early 1880s as sewing cheap mother-of-pearl buttons onto their waistcoats and jackets for decoration, a small display of conspicuous consumption that they could afford; Croft apparently liked the style and adopted it himself, but cranked it up to 100 and simply covered his clothing with a solid layer of buttons. Some writers/speakers have stated that he did this to promote charitable causes, but others suggest that his major charity work came later, once he had become an eye-catching Pearly.
Croft lived and worked in Somers Town, and was photographed for The Strand in 1902 as "the Pearlie King of Somers Town" - most likely, this photo. As Croft did get more involved in charity work, he's said to have recruited individuals from different parts of London who picked up on the button tradition and became Pearly Kings of their particular borough, and their descendants have a particular right to continue it as a sort of royal heredity - others say that the costers of a borough would elect their own Pearly King to hold some sort of ceremonial function. Both origin stories put a heavy emphasis on their charity work and the trust given to the Pearlies as a result, and both allow for the wives of Pearly Kings having joined in as Pearly Queens, and sometimes their children as Princes and Princesses.
Alf Dole's autobiography (well, sort of auto - he wrote it with Jeff Huds, who may have done the bulk of it as a ghostwriter) The Pearly Prince of St. Pancras seems to be the most accurate and authentic account out there of the tradition, as it's based on his and his fathers' memories.
As to how this crossed over into vaudeville, or, more appropriately since it's British, music hall - as you can see, this was a working-class London tradition, making it ripe for use by a performer as a persona that those in the audience would relate to. Hyram Travers was a singer-comedian who made his career out of singing "coster songs" written from the perspective and in the accent of a Cockney street trader. It's not entirely clear to me when he decided to incorporate the pearl buttons into his costume, but it seems to have been by at least 1886, which is the earliest reference I can find to him being called "the Pearly King". It seems plausible to me that there was a certain amount of back-and-forth between the street and the stage here, with Travers picking up the style from costers to make his costume recognizable and Croft then imitating him in order to attract more attention at a particular charity event, but it's likely that we'll never know the actual progression here, since there are very few sources to go on.