What are these things, and why are they on my tomato plant? - eviltoast

This little sack thing was on the tomato plant today. When it was touched, these little worm-looking things popped out, like a spider sack of worms.

  • What are they?
  • Why are they on the plant?
  • Are they harmful to the plant or to us?

Thanks!