First make the tomato sauce : Chop the onion and garlic.
Heat the oil in a shallow pan, and gently fry the onion until soft. Add the garlic and cook for another minute, then add the oregano and the tinned tomatoes. Break the tomatoes up with a wooden spoon and add the sugar and a drop of water. Bring to the simmer and reduce it a thick sauce then turn off the heat. Stir in the basil, and set aside with a lid on.
Meanwhile preheat the oven to 200˚C. Chop the pepper and onion into 1-2cm pieces. Cut the tomatoes in half. Place these in a roasting tin. Drizzle with olive oil and season with salt and freshly ground pepper. Place the meatballs on top and bake for 15 minutes.
Pour the tomato sauce over the meatballs, toss gently. Return it to the oven and cook for a further 10 minutes or so, until the meatballs are cooked and the sauce is hot and sticky.
Meanwhile, bring a large pan of lightly salted water to the boil. Add the spaghetti and cook according to the instructions on the packaging. Drain and keep warm in the pan.
Serve the spaghetti tossed with the meatball mixture and some grated Parmesan and/or chilli flakes if you like.