I think that both 'at' and 'on' in your examples give an approximateness to the action.
Chewing something is what you do when you want to eat it, or you are doing it deliberately and repetitively. Chewing at something is a bit more 'recreational'.
With pecking, the action is already a bit approximate, so if the action is aimed at something specific (like the seeds) - it is giving the idea that it isn't very effective.
A peck is a single, stabbing motion, so I don't know if it really describes eating a worm. From memory a bird will peck at a worm a few times to stun it, or kill it, then it will pick it up and eat it.