Skipping the ice bath
If you don't immediately transfer hard-boiled eggs to an ice bath, they will continue to cook, and they'll likely end up overcooked. The icy water stops the cooking process, and also causes the molecules that make up the egg to condense, which separates the egg membrane from the shell for far easier peeling.
Pro tip: For a foolproof alternative to boiling that yields evenly cooked, easy-to-peel eggs every time, try steaming the eggs. Fill a large pot with about an inch of water, place a steamer basket inside, cover, and bring the water to a boil over high heat. Place whole eggs in the steamer basket, cover, and let cook for exactly 6 minutes for soft-boiled or exactly 12 minutes for hard-boiled. Immediately place eggs in an ice bath and allow them to cool for about 20 minutes before peeling.