In a two quart sauce pan on medium heat, cook bacon until lightly brown but not crisp. When bacon has browned add green beans. Add salt, sugar, pepper, and mix well. Place onion on top of green beans, cover with a lid and bring to a light boil. Turn heat down to low and simmer beans for 45 minutes. Cooking the green beans for 45 minutes on a very low simmer will blend the flavors.