Place eggs in a large pot and cover with water. Bring to a boil, then turn off the heat and cover. Let sit for 10-12 minutes.
Transfer eggs to an ice bath and let cool. Peel eggs once cooled.
In a saucepan, combine vinegar, water, sugar, salt, peppercorns, mustard seeds, garlic, and onion. Add beet if using. Bring to a boil, then reduce to a simmer for 5 minutes. Remove from heat and cool slightly.
Place peeled eggs in a large glass jar. Pour the brine over the eggs, making sure they are completely submerged.
Seal the jar and refrigerate for at least 3 days before serving for best flavor.