The experience is comparable to completing the capital city cooking and fishing quests. For example, my level 77 mage gets 27K XP from the Orgrimmar cooking dailies and gets 26K for fighting a battle with three level 1s vs. a level 2. The XP varies according to how much higher your highest pet that your battling with is above the pets you are fighting. A four level difference nets my mage about 21K XP. Whether you are battling other players, wild pets or tamers, the XP gained is consistent.
Is it worth it to try to level via pet battling? I would recommend questing, gathering, archaeology digging and battling pets in the same zone to maximize your leveling potential. But if you're in a gotta-catch-'em-all frenzy, as I sometimes am, you can battle pets with your leveling alts while still progressing more than just your pets.
I wouldn't be surprised if players tried to level while just pet battling. Will you be taking advantage of pet battle player XP?