**Prepare Chicken:** Season chicken breasts with salt and pepper. Heat olive oil in a grill pan or skillet over medium heat. Cook the chicken for 4–5 minutes per side, or until fully cooked and internal temperature reaches 165°F (74°C). Remove from the pan and let rest for 5 minutes before slicing thinly.
**Toast the Bread:** Spread butter on one side of each bread slice. In the same pan or a clean skillet, toast the buttered side of the bread until golden brown.
**Assemble Sandwich:** Spread pesto on the unbuttered side of each bread slice. Layer the sliced chicken, mozzarella, and sun-dried tomatoes (if using) on two of the bread slices. Top with the remaining bread slices, toasted side out.
**Melt the Cheese:** Return the sandwiches to the skillet. Cook over medium-low heat, pressing gently with a spatula, until the cheese melts and the bread is crispy, about 3–4 minutes per side.
**Serve:** Remove from heat, slice in half, and serve warm.