I think the songs are more to keep the attention of kids on longer(kids of all ages). I remember when I was a kid, I would always fast-forward to the songs. It always kept my attention, and the words didn't felt like I was listening to my parents.
Music is very important to cartoons, songs not as much. Though i do know what youre talking about, only 5 new songs in MLP season 7. I do enjoy the songs in MLP, though they arent always gems. I'll take quality over quantity any day
Song and dance numbers, especially during montages are kind of nice. Remember though, first view people have of a cartoon or anime though is its theme song. Often if that is a total flop, it will have a hard time attracting fans.
Next is the internal music. As i said Song and Dance numbers can be really nice, and they don't have to be first person. Lots of animated movies use 3ed person songs sung while the characters are doing something. Dragon riders of berk has great musical score for flying for example.
From there it depends on the type of series. Some series and movies, music is an integral part of the and storyline. HappyFeet, songs are part of their society, and are used for the plot. My little ponies, again songs and music could be looked at as cultural for the ponies. Alpha and Omega had the same issue, with "howls" being used as musical songs, and needed to be well done to carry the story. Then of course you have macross, where songs are actually a weapon.
Some cartoons and anime don't need songs but still need good internal scores, starship troopers, exosquad, ghost in the shell, all had really haunting scores during death scenes, and really good scores during combat to set the moods. Music can really change the feel of a show if used properly - Buffy the vampire slayer, Once More, with Feelings an example of how songs can change and carry a show, especially with the song "drawn to the fire".
Depends on what style cartoon it is. I don't expect any show tunes from cartoons with a serious setting like something involving the Justice League or Avengers, but in other settings they can be entertaining.
I feel that if the song either A) Furthers the plot or B) Is entertaining then they are important. But it really boils down to what kind of show. A show like MLP uses its songs to give insight into the characters' mind-sets or to move the story along, therefore they are important. However, in a show like Transformers: Prime, a musical number would be completely out of place given that the tone of the show is very much a military drama with some humor to break up the tension every now and then. So, I guess it really just depends on the show. In a Slice of Life comedy like MLP it works fine.