For the lemons: Toss the lemons and onions with the sugar and salt in a medium bowl. Put the oregano and chile in a glass jar, and then add the lemons and onions and pack tightly. Fill the jar with olive oil. Close the jar and give it a good shake, and then add more oil if there is still room. Close the jar again and refrigerate for 2 days to marinate. Dice 15 slices of the lemons and all the onions.
For the salad: Preheat the oven to 350 degrees F.
Toast the walnuts on a baking sheet for about 10 minutes. Let cool.
Blanch the green beans in a large pot of boiling water for 1 minute. Drain and immediately plunge into an ice bath. Drain.
Heat a large frying pan over medium heat and fry the bacon until crispy, about 10 minutes. Drain on paper towels.
Add the lemons, onions, green beans, walnuts, bacon and tomatoes to a salad bowl. Drizzle with some oil from the marinated lemons and season with salt and black pepper. Toss and serve.