How can I cook an egg to win at egg tapping?
To keep this on topic, I'll focus on ingredient selection and preparation, any further hints are a physical aspect and have to do with where to hold and how to hit.

Your first goal is to find an egg with a very hard shell:


This means, find an egg from a rather young (max. 6 month old) chicken. The thickness of the shell decreases naturally during the 1-1.5 years a chicken is typically kept for egg production.
Chickens that have access to the outside and that pick up a lot of sand, grit and small stones and have a very diverse feed with a generous access to grains plus supplements like oyster shells, will produce the hardest shells.
And, little known, green eggs (from the so-called Easter Egger breeds) have a thicker and harder shell than white eggs. Bonus: you can skip the coloring step...


All eggs are harder when hard-boiled (compared to raw): 


Just avoid anything that weakens the shell, so no vinegar in the cooking water or the colouring liquid. Use natural dyes (as opposed to the commercial products where you dip a cooked egg in a vinegar-water-dye solution). Likewise, do not wash the eggs unless absolutely necessary, the natural protective layer should also prevent weakening the shell.
I would also avoid mechanical stress, so bring your eggs to room temperature and use the cooking method where you put the eggs in cool water, bring them gently to a (near) boil and let stand in the covered pot off the heat for fifteen minutes or so. In this case, I'd probably rather have the green ring around the yolk than a semi-soft egg.