The ideal way to hard cook an egg is to steam it and then drop it in ice water. The shells practically jump off the egg and the egg holds its beautiful shape.
Jeff Potter, author of Cooking for Geeks, explains the science behind this in the video above. Steam the egg for about 12 minutes (in a steamer basket or even sitting in a tiny bit of boiling water) and you won't have to struggle with peeling the eggshell.
If you insist on boiling, put the eggs in when the water is already boiling. You could also shake the shells right off, but the steaming method might be the most effortless way to get easy-to-peel hard eggs.