Used to highlight and ridicule snobbish forms of behaviour or speech.
'La-di-da' was fading out of use in the language until it staged something of a comeback following its use by the eponymous heroine of the 1977 film Annie Hall. Diane Keaton's character actually said 'La-di-da, la-di-da, la la'. This wasn't a reference to swanky or snobbish behaviour - it was used as a meaningless phrase, spoken out of context when nervous, to emphasize Hall's ditzy personality.
The expression was in general use by the 1880s. This usage was probably advanced by the inclusion of 'la-di-da' in some songs of the day. George Duckworth Atkin and others collected many of these in the journal House Scraps, which was published around 1883, and included these two songs:
We are a Merry Family, We are! we are! we are!
Jack, he deals in Canadas,
In Trunks, one, two, or three;
Willie, he gives turns away,
But not to you or me.
The young 'un goes to music-halls,
And does the la-di-da;
We are a shiney family,
We are! we are! we are!
He's a well-known old Adonis,
You may tell it by his nose,
For the colour all his own is,
It's a pleasing combination
Of the beetroot and the rose.
'La-di-da' sounds as though it may be of French origin. It has been taken up as Cockney Rhyming Slang for 'cigar' but that, of course, wasn't the origin of the term, merely a usage of it. In fact, 'la-di-da' derives from the earlier reduplicated phrase 'lardy-dardy'. That phrase was cited in Lacy's Acting Edition of Plays, Dramas, Farces and Extravagances, 1849:
One of those haw-haw fellows, who used to hang around you - lardy dardy, pois'ning the atmosphere with their pomadey. [Note: pomade has two meanings - either a type of cider or a sticky, scented gel used to dress hair. We can safely assume the above citation refers to the latter.]
That example shows 'lardy dardy' used as an exclamation. Other contemporary sources used it in the current descriptive manner, for example, this piece from Mary Elizabeth Braddon's novel Three times dead; or, The secret of the heath, 1859:
You're not much good, my friend, says I, with your lardy dardy ways, and your cold blooded words.
Reduplicated expressions like lardy-dardy usually have one word that supplies the meaning and a secondary rhyming word, which is added for emphasis. In this case the significant word is 'lardy'. These days, 'lardy' just means 'full of lard', like lardy cakes, the sweet, fatty 'heart attack on a plate' buns that are still sold in the UK without any form of health warning. 'Lardy-dardy and 'la-di-da' have nothing to do with lard. It is more likely that 'lardy' was a corruption of 'lady' or 'lordy', which match the meaning of the phrases.
See other reduplicated phrases.