Bring a large pot of salted water to a boil. Add the penne pasta and cook according to package instructions until al dente. Reserve ½ cup of pasta water, then drain the pasta in a colander and set aside.
While the pasta cooks, heat the olive oil in a large skillet over medium heat. Add the diced onion and sauté for 3-4 minutes until softened and translucent.
Remove the casing from the Italian sausage and add the sausage meat to the skillet. Break it apart with a wooden spoon and cook for about 6-8 minutes until browned and cooked through.
Stir in the minced garlic and cook for another 1-2 minutes until fragrant.
Add the diced tomatoes (with their juices), dried herbs, and red pepper flakes (if using). Stir well and bring the mixture to a simmer. Let it cook for about 5 minutes to allow the flavors to meld.
Add the drained pasta to the skillet with the sausage sauce. Toss to combine, adding reserved pasta water a little at a time until the sauce reaches your desired consistency. Season with salt and pepper to taste.
Serve hot, topped with grated Parmesan cheese and fresh basil leaves, if desired.