First of all, before you even cook the eggs, if you store the eggs tip-point down, this will center the yolk.
Now, when you cook them, cook them slowly! Place them in a pot of cold water and bring that to a boil, and once it reaches a rolling boil, turn the heat down to low and cover the pot. Halfway through the cooking time (7 minutes) roll the eggs over. This will help center the yolks.
When you're done cooking them, remove them to a bowl of ice water. This helps separate the egg membrane and the shells, making them easier to peel.
(Image: Kathryn Hill)