Heat 2 tablespoons oil in a big skillet over moderate heat; add in the onion and sweet potato; cook, covered, until the potato softens, about 8-10 minutes.
Add in the apple, raisins, and salt/pepper to taste; cook 3-5 minutes or until the apple softens; keep warm over low heat.
Cook the penne in a large pot of salted water, stirring occasionally, until al dente, about 8-10 minutes.
When the pasta is cooked, drain and place in a large serving bowl.
Add the sweet potato and apple mixture and the remaining olive oil; toss gently to combine.