Depending on the age of the children being targeted there could be a few reasons...
Babies & Toddlers
For younger children various studies have shown that listening to music can help their development.
For example, singing songs teaches children about language such as how it is put together. When singing, words and phrases are slower and are easier to understand. It will help them to build up a vocabulary of sounds and words before they can even understand the meaning.
Listening to music also helps to put babies and toddlers into a relaxed and receptive state.
Most babies tend to have an affinity to music as well, they will sway or move with the rhythm which will help build coordination and motor skills.
As a lot of TV for this age range is aimed at helping them learn words and develop, using music as a tool towards this end just makes sense.
Older Children
For older children who are making the progression from the baby & toddler music and singing oriented TV, to TV aimed at their own age. The music might be there to help ease the progression from fun learning to TV that contains more serious dialogue.
There is also the cynical aspect that many of the shows on Disney and Nickelodeon contain actors that are also singers and they will obviously try to push the singing aspects of these to provide an additional revenue stream, and to help grow that performer as a musical artist and help generate song sales, possibly long after the TV show has finished.
Examples of these would be
- Bella Thorne - Shake it Up
- Joe Jonas - Camp Rock
- Zendaya - Shake it Up
- Nick Jonas - Camp Rock
- Demi Lovato - Sonny with a Chance
- Selena Gomez - Wizards of Waverly Place
- Ariana Grande - Victorious
- Miley Cyrus - Hannah Montana
And both the lead stars in your comment Example "Austin & Ally", Ross Lynch and Laura Marano have released albums - albeit soundtrack albums for Disney programmes & films. Ross Lynch is also in the Pop-Punk band R5.
Adults
Adults have grown out of the need to develop language in this way, as other methods are likely to be more effective.
Adults are also probably less likely to fall for the marketing technique for the singers, after-all that is what X-Factor and the like are for.
So adults that watch films or TV with musical numbers in do it purely for the pleasure. Thus there is a specific musical genre and TV producers do not feel the need to place it into everyday programming.