Diatomaceous earth is the fossilized skeletons of diatoms. Conventional wisdom has it that the sharp edges of the skeletons will lacerate the exoskeleton of insects causing them to dessicate, since these wounds won't heal. Typically, it is used to control insects. There is no science to support a lot of the traditional uses. After all, the chemical companies cannot make money off of anything natural.
Nevertheless, adding it to feed can allow you to derive whatever benefits come from the diatomaceous earth passing through the gut of the chicken. The diatomaceous earth in the poop is considered to control flies by interacting with the maggots emerging from the flies' eggs laid in the poop.
I use it in my shop to control spiders. Dusting the baseboards keeps the spiders at bay, so I don't have cobwebs on the ceilings. I add it to my chickens feed. I feel that it does help with the flies, although I don't have any absolute method of determining this. I have killed fire ant mounds with it.
It is a fine powder, so use care to protect yourself from the dust. As with any dust, wear a mask or stay upwind.
Since food grade diatomaceous earth has no chemicals in it, its use is a neutral process. There are many things that people do simply because they believe in them. There are many sources on the internet where you can read about its use; and decide for yourself.
Chris