Hello, too many of any "treats" is not good- they can get fat and slow egg production- also, earthworms can be hosts for parasitic worms- as long as you worm your hens regularly and don't give them too many then they wont come to any harm.
regards, David