Preheat the oven to 400 degrees F. Line a sheet tray with parchment paper.
Set up a dredging station: Place the flour in a medium bowl. Whisk together the milk and eggs in a second medium bowl. Stir together the onion pieces, panko, salt and pepper in a third medium bowl.
Dip the green beans first into the flour to coat, shaking off any excess flour, then dip the beans in the egg mixture to coat. Finally, dip the beans into the panko-onion mixture and place the green beans on the prepared sheet tray, about 1/4-inch apart.
Bake the green beans, turning them over halfway through baking, until they are golden and crispy, 12 to 15 minutes. Transfer to a platter and serve immediately.