Answer: Since sparrows generally eat either seeds or insects, I suspect they may be doing you a favor by eating some type of insect. Careful inspection may reveal some sort of infestation on the flowers. In this case, ridding the plants of the pests should also solve the bird problem.
If that's not the case and you wish to deter them, you may face a challenge! One suggestion is to shield the plants with relatively unobtrusive black netting; another might be to string several strands of fishing line to serve as a source of confusion and hence deter them. One of the commercially available bird scarers such as a pretend owl or cat might work. Finally, you might consider setting up an alternate source of food such as a bird feeder to try to lure them to something more desirable than your petunias!
Q&A Library Searching Tips