In a large skillet or pot, heat olive oil over medium heat. Add sliced onions and cook, stirring occasionally, until softened and caramelized (about 20-25 minutes).
If desired, sprinkle brown sugar over onions during the last 5 minutes of cooking for added sweetness. Season with salt and pepper.
Add bratwurst to the skillet with the caramelized onions. Pour beer over the brats, ensuring they are partially submerged.
Bring the beer to a simmer, then reduce heat to low, cover, and cook for 15-20 minutes, or until the brats are cooked through.
Remove brats from the beer and grill them for a few minutes on each side to get a nice char. Alternatively, you can broil them in the oven for a similar effect.
Serve the beer brats on buns with the caramelized onions on top. Add your favorite condiments like mustard, ketchup, or relish.
Notes
For extra flavor, try adding a bay leaf or some garlic to the beer while simmering the brats.