my current research looks at how earthworms effect the flow of greenhouse gases out of soils and also involve collecting earthworm poo! All of this requires the use of happy, alive earthworms.
I think that whenever and where ever possible scientists should avoid harming earthworms in their experiments, and I find it hard to imagine that any scientist would say otherwise.
Equally I think there are times when the benefits of an experiment could out weigh the ethical problem of harming animals, e.g. when testing new ways of saving lives or protecting the environment. I think anyone who has been kept alive by modern medicines for example would agree with this.
I am far less convinced by the case for testing things like cosmetics on animals, I think it is hard to justify and generally I think this is on the way out.