Heat oven to 400° F. Oil a 4-quart casserole dish with 2 teaspoons of the oil. Cook the penne according to the package directions.
Meanwhile, heat the remaining tablespoon oil in a large saucepan over medium heat. Add the garlic and cook for 1 minute.
Add the tomatoes, sugar, 1 teaspoon salt, and ⅛ teaspoon pepper. Bring to a boil. Reduce heat and simmer until slightly thickened, about 15 minutes.
Stir in the cream. Add the cooked penne and toss.
Spoon the pasta into the prepared casserole dish and top with dollops of the ricotta. Bake until bubbling, 15 to 20 minutes.