I believe they are nematodes, roundworms, since they are so wiggly. I'm fairly certain that having some are both inevitable if you have live plants and okay. Carnivorous fish like bettas will chow down on them for a snack. If you notice a few, I'm pretty sure it's fine, but if you notice the tank is overrun, start feeding less, do larger more frequent water changes, and clean as many things as you can.
For more info:
http://www.algone.com/worms-in-the-aquarium