The pumpkin bomb is a good trap, but not a great response. Use your sunflower and tomato to handle foes as they pop up, and fire your pumpkin bomb in a spot where you think zombies will frequent.
Reload
After three shots or so, your sunflower and tomato will need to reload. Try to vary your usage of each so you're not caught with your plants down in the face of a zombie assault.
Sunflower
Upgrade your sunflower early! The additional hitting power of the Level 2 upgrade means you'll be able to stop a zombie with one barrage instead of two.