Preheat an outdoor grill for medium-high heat. When hot, lightly oil grate.
Combine the beer and onions in a large pot; bring to a boil. Submerge the bratwurst in the beer; add the red pepper flakes, garlic powder, salt, and pepper. Reduce heat to medium and cook another 10 to 12 minutes.
Remove the bratwurst from the beer mixture; reduce heat to low, and continue cooking the onions.
Cook the bratwurst on the preheated grill, turning once, 5 to 10 minutes.