On the tomato plant we really need a better closeup photo to be able with 100% certainty to ID them but, we don't need that to kill them safely and effectively. Just use a spinosad based insecticide such as Captain Jacks Dead Bug Brew or Monterrey Garden Insect Killer. On the Pumpkin you have what are called hard scale or armored scale insects. The best way to kill them is by smothering them, blocking off their oxygen supply and the oil in Neem does this effectively.