Cook the pasta: Bring a large pot of salted water to a rolling boil.
Add farfalle and cook until al dente (check the package and subtract 1 minute). Reserve 1/2 cup pasta water, then drain and spread on a tray to cool slightly.
Toast the nuts (optional): In a dry skillet over medium heat, toast pine nuts or almonds for 3–4 minutes, stirring, until fragrant and lightly golden. Set aside to cool.
Prep the vegetables: Halve the tomatoes, dice the cucumber, thinly slice the red onion, and slice the olives.
Pat the mozzarella dry if needed.
Loosen the pesto: In a large mixing bowl, stir pesto with 1 tablespoon lemon juice and 1–2 tablespoons of the reserved pasta water until glossy and pourable. Add a splash of olive oil if it still seems thick.
Toss the pasta: Add warm (not hot) farfalle to the bowl and fold to coat every piece. The slight warmth helps the pesto cling.
Add mix-ins: Gently fold in tomatoes, cucumber, red onion, olives, mozzarella, and Parmesan.
Add lemon zest and more lemon juice to taste.
Season: Taste and season with salt and black pepper. Add more olive oil or a spoonful of pasta water if you want a looser salad.
Finish and chill: Sprinkle with toasted nuts and torn basil. You can serve right away, or chill for 30–60 minutes to let flavors mingle.
Before serving: If chilled, refresh with a drizzle of olive oil and a squeeze of lemon.
Top with extra Parmesan.