If using fresh green beans, in a medium saucepan, cook beans and onion in a small amount of boiling salted water for 20 to 25 minutes or until beans are crisp-tender. Drain. (For frozen beans, cook beans and onion following package directions.)
Meanwhile, in a medium skillet, cook bacon until crisp. Transfer bacon to paper towels to drain. Crumble bacon; set aside. Reserve drippings in skillet.
Stir flour into bacon drippings. Stir in vinegar, water, sugar, salt, and pepper. Cook and stir until mixture is thickened and bubbly; cook and stir for 1 minute more.
Pour vinegar mixture over warm beans. Add crumbled bacon. Toss to coat. Makes 4 to 6 side-dish servings.