01 - Set oven temperature to 400°F (200°C). Prepare a baking tray by lining with parchment paper or lightly greasing it.
02 - Place the salmon fillets on the baking tray. Season both sides evenly with salt and freshly ground black pepper.
03 - Spread one tablespoon of basil pesto evenly on top of each salmon fillet.
04 - Distribute the halved cherry tomatoes and, if using, the thinly sliced red onion around the salmon on the tray.
05 - Drizzle the olive oil over the tomatoes and onions. Place lemon slices atop the salmon and vegetables.
06 - Bake in the preheated oven for 15 to 18 minutes, until the salmon flakes easily with a fork and is thoroughly cooked.
07 - Remove from oven and garnish with fresh basil leaves if desired. Serve immediately.