Welcome to BYC!
It depends on a lot of things. First off, many times you can tell if they have worms if they have symptoms...pale comb, becoming very thin while eating like a horse, bad diarrhea, stopped laying, (although lots of other things can cause a hen to stop laying), possibly worms in the poop or even the eggs. You can always take a poop sample into your vet for analysis. Then you will know for sure and what types they do have. Also your coop hygene contributes over loads of worms as does certain areas of the country that have outbreaks of round or tape worms. Especially in climates where it rarely freezes in the winter.
So all this being said, if the birds are not showing any signs of worms, I wouldn't worm them. Never hurts to get a poop sample looked at and give the birds a good overall exam looking for things that may be causing issues.
There is a thread here on BYC on why chickens can stop laying. Maybe you can glean some info from this thread or even post in it....
https://www.backyardchickens.com/t/423023/why-arent-my-chickens-laying-here-are-your-answers
Enjoy your flock and welcome to ours!