Chickens love to peck. Although they do not normally peck their own eggs, if they begin and develop and like the taste of the eggs, it may become a habit if no one prevents them. You could try the following if you want to prevent them from eating their eggs:
Feed your chickens grits. Grits are available for purchase from your local farm supply store, of you could make them yourself. The eggshells have to be roasted until they are brownish in color and crunchy, in order to make grits. The shells should then be pounded and mixed with the chicken feed. If the chickens are lacking calcium in their diet, they will seek an alternative source and eggshells are one such source. The feed should have sufficient calcium and protein.
A weak eggshell can easily break and when this occurs, the chicken will start pecking at it. When eggshells are weak, this indicates that the chicken lacks Vitamin D3, calcium, protein or is infected. Checks should be made for both infections and feed composition.
If there are no infections and the feed is adequate, it is possible that the nest box is too hard. Padding should be provided for the nest, to reduce accidents to the egg when the chicken shuffles and scratches in the nest box. The nest box has to be kept dark, as chickens are less likely to move around in darker places. The chickens are relaxed in dark nest boxes. The least amount of agitation results in the chickens being less likely to trample on the eggs. The number of chickens in a nest box needs to be limited, as the less hens in each nest box the better. Each nest box should typically accommodate four hens.
Eggshells should not be fed to the chicken. The shells should be gathered and the coop cleaned. Similarly, no dirtied eggs should be fed to the chickens. If the egg is introduced to the chickens, they will develop a taste for it, resulting in the start of a habit. If the chickens become bored, they will start pecking at the eggs. They can be kept busy instead by hanging vegetable scraps on a string for them to peck.
Collect the eggs as least twice daily if possible. This allows for more efficient monitoring of the production of eggs. If the quantity of eggs is reduced because of chicken pecking on them, then the chickens need to be isolated. The egg residues in the beak of the chicken allow you to confirm if this is happening. After isolating the chicken, they should be fed with liquid milk for a while. If it is not possible to isolate the chicken, then the upper beak needs to be trimmed.
You could also place golf balls in the nest box, to prevent the chicken from eating their eggs, as they will be discouraged from pecking. If the egg supply is still reduced after you have done this, it may be that rodents are getting into your nest box. Regardless of the case, you need to prevent the chicken from tasting the eggs, because breaking this habit will be almost impossible.