Eggs slowly heated in cold water will stick to their shells.
In fact, I discovered that the only thing that really seems
to make a difference is the initial cooking phase. Drop the
eggs into hot water, and they’ll peel pretty easily (though
even this doesn’t work 100 percent of the time). Heat them
up slowly, starting with cold water, and the egg proteins will
end up fused to the inside of the shell.
As far as the actual peeling process, the easiest way is to
peel the still-hot eggs under cool running water, starting
from the fat end, where the air pocket is located. When the
eggs are hot, the connection between the membrane and egg
white is weaker, making it easier to remove the shell. The
cool water not only helps gently dislodge stubborn bits of
shell, it also prevents your fingers from getting burned. I put
a fine-mesh strainer or colander in the sink to catch the
shells, for easy cleanup.