I'm no expert but they just like garden worms to me, shouldn't be harmful but might rot and cause an ammonia spike/higher nitrates.
Like I said, not an expert but thats what they look like to me, I'm guessing you fed them to your fish, but they ignored them and they died in the tank.