Place the beans in a saucepan with enough water to cover; bring to a boil, reduce heat to a simmer, and cook the beans until tender but still bright green, about 8 minutes. Drain.
Melt the butter in a large skillet over medium-low heat; cook and stir the onion and garlic in the melted butter until the onion is translucent and beginning to brown, 5 to 6 minutes. Add the beans, salt, pepper, and dill; cook and stir until the beans are hot and the dill is cooked, 2 to 3 more minutes. Transfer the mixture to a serving dish and top with the eggs to serve.
Adapted from AllRecipes.com