This traditional verse relates to Ladybirds, brightly coloured insects commonly viewed as lucky. The English version has been dated to at least 1744, when it appeared in a collection of nursery rhymes. The verse has several popular forms, including:
Ladybird, ladybird fly away home,
Your house is on fire and your children are gone,
All except one,
And her name is Ann,
And she hid under the baking pan.
A shorter, grimmer version is also widespread:
Ladybird, ladybird, fly away home,
Your house is on fire,
Your children shall burn!
Ann who hides may also be Nan, Anne or Little Anne. She may have hidden under a warming pan, porridge pan, frying pan or even a pudding pan. Some variants are radically different:
There were superstitious beliefs that it was unlucky to kill a ladybird, and that the verse would make them fly off. Another superstition states that you should chant the verse if a ladybird lands on you: if it then flies away again, your wish will come true.
Ladybirds are useful as eaters of aphids, which would otherwise damage plants. They can also be a nuisance, but there would be logic from a farmer or gardener’s viewpoint in trying to shoo them away rather than kill them. This could be the rational basis for teaching children to respect them.
This little Nan version could be a reference to the habit of setting fires to smoke the bugs out of plants. It caused the ladybugs to fly away. The younger insects, in maggot form, would have to crawl away. Thus "your children all roam". The insects in pupate form, within their shells, would not be able to flee the danger and thus would die from the smoke or fire. The idea is that Nan is within her pupal case and cannot flee until she breaks free - "weaving her laces", undoing her pupal case.
At the outset of Chapter 14 of Tom Sawyer, Mark Twain writes: "A brown spotted lady-bug climbed the dizzy heights of a grass blade, and Tom bent down close to it and said: 'Lady-bug, lady-bug, fly away home, Your house is on fire, your children's alone'..." 
Ladybug Ladybug is a 1963 film about the evacuation of a rural elementary school following a (mistaken) alert of an imminent nuclear attack.
Fly Away Home is a 1996 film about a young girl who, with her father, leads a flock of Canada geese to a wildlife refuge.
The rhyme is referred to in the 2011 British horror film The Awakening.
It appears in Chapter 8 of the Czech classic, The Grandmother (Babička). "Adelka placed the lady-bird on her open palm and raised her hand high, chanting: 'Lady-bird, lady-bird, fly away home-' 'Your house is on fire, and your children are gone!' completed Willie."
Your House is on Fire, Your Children all Gone' by Stefan Kiesbye takes its name from this rhyme.
A variant of the song is sung by Charlotte's ghost in the Nancy Drew game from Her interactive, "The Ghost of Thornton Hall". (Ladybug, ladybug, fly away home/ your house is on fire and your children are gone/all except one/sweet Charlotte Ann/ and she hid under the frying pan)
An excerpt of this rhyme is found on the back doorstep of the printshop in Philadelphia in 1778 at the close of Chapter 111 / Part 7 of "Written in My Own Heart's Blood" by Diana Gabaldon (published June 10th 2014). It is interpreted as a threat on the inhabitants and their children, as declared seditionists in the American Revolution.
^I. Opie and P. Opie, The Oxford Dictionary of Nursery Rhymes (Oxford University Press, 1951, 2nd edn., 1997), p. 263.