I don’t think anybody quite knows.  The OED gives four distinct types of these formations.  They are wondering whether it has something to do with the ***O*** interjection with some reinforcement from similar words.  They also note that it is nowhere more common than in Australia.

The four different types  they talk about may or may not come from the same linguistic impulse, either. Further research is called for.

An excerpt from the OED2 is given below.

> **-o**, <i>suffix<sup>2</sup>. Perh. connected with **O** *int.<sup>3</sup>* and reinforced by the final syllable of abbrev. forms such as **compo, hippo, photo**, etc. The use of the suffix is widespread in English-speaking countries but nowhere more so than in Australia (e.g. *afto*, **arvo, Commo,** etc.). 

> * **a.** Forming colloq. or slang equivalents added as a final syllable to (*a*).shortened forms of sbs., as **aggro, ammo, beano, combo, compo<sup>2</sup>, metho<sup>1</sup>**, etc.; (*b*).sbs., as **boyo, bucko, kiddo,** etc.; (*c*).adjs., as **cheapo, deado**.
>
>  * 1967 J. Burke *Till Death us do Part* ii. 31 ― You can buy that cheapo, cos no one wants it. 
 * 1969 *It* 13-25 June 16/2 ― Hustle the bread from whatever source you can··. If all the above sounds like too much aggro don’t··go and··run your benefit event in conjunction with an existing club. 
 * 1969 *It* 10-23 Oct. 10/1 ― At the moment kids are split up into different subcultural groups which have been driven by the system into a permanent state of aggro with each other. 
 * 1969 *Daily Mail* 8 Nov. 8/3 ― How do we get past him, man? Like he might start some agro. 
 * 1970 *Observer* 11 Jan. 28/2 ― Hippies and aggro-boys may look collectively and individually startling, pretty or repulsive according to tribal loyalty. 
 * 1973 A. Hunter *Gently French* iii. 29, ― I gets hold of the bastard and tries to pull him up. Then I sees he’s bloody deado. 
 * 1973 M. Amis *Rachel Papers* 65 ― It wasn’t day-to-day aggro, nor the drooped, guilty, somehow sexless disgruntlement I had seen overtake many relationships. 
 * 1977 E. Crispin *Glimpses of Moon* xi. 215 ― It was possible to judge··that his aggro was strictly verbal.

> * **b.** Forming personal (chiefly occupational) sbs. from non-personal sbs., as **bottle-o(h, milko, wino,** etc.

> * **c.** Forming sbs. from adjs., as **pinko, weirdo,** etc.

> * **d.** As a meaningless ending in other words, as **billy-o, good-o, cheerio, right(y)o,** etc.

It’s not surprising you heard it in songs; I think it happens there a lot. Consider the words the children’s song [*The Farmer in the Dell*](http://en.wikipedia.org/wiki/The_Farmer_in_the_Dell):

>           *The farmer in the dell  
          The farmer in the dell  
          Heigh-ho, the **derry-o**  
          The farmer in the dell*.


This kind of thing is used a great deal by the “nonsense” of Tolkien’s [Tom Bombadil](http://en.wikipedia.org/wiki/Tom_Bombadil) character when he sings — which he pretty much does always, even when it’s written as prose.

Here is a bit from when he rescues the Hobbits from Old Man Willow:

> He turned round and listened, and soon there could be no doubt: someone was
singing a song; a deep glad voice was singing carelessly and happily, but
it was singing nonsense:

>           *Hey dol! merry dol! ring a dong <b>dillo</b>!* <br>
          *Ring a dong! hop along! fal lal the willow!* <br>
          *Tom Bom, jolly Tom, Tom <b>Bombadillo</b>!*<br>

> Half hopeful and half afraid of some new danger, Frodo and Sam now both 
stood still. Suddenly out of a long string of nonsense-words (or so they
seemed) the voice rose up loud and clear and burst into this song:

>           *Hey! Come merry dot! derry dol! My darling! <br>
          Light goes the weather-wind and the feathered starling. <br>
          Down along under Hill, shining in the sunlight, <br>
          Waiting on the doorstep for the cold starlight, <br>
          There my pretty lady is. River-woman’s daughter, <br>
          Slender as the willow-wand, clearer than the water. <br>
          Old Tom Bombadil water-lilies bringing <br>
          Comes hopping home again. Can you hear him singing? <br>
          Hey! Come merry dol! deny dol! and **merry-o**, <br>
          Goldberry, Goldberry, merry yellow **berry-o**! <br>
          Poor old Willow-man, you tuck your roots away! <br>
          Tom’s in a hurry now. Evening will follow day. <br>
          Tom’s going home again water-lilies bringing. <br>
          Hey! Come derry dol! Can you hear me singing?*<br>

I imagine uncountably many similar examples could be pulled from literature and nursery rhymes alike.