Heat an outdoor grill to medium-high, direct heat. For oven cooking, preheat the oven to 425F.
Place chunked pineapple, sliced onion, and sliced red pepper in a large bowl. Add 1 cup of the barbecue sauce, 1/2 teaspoon of the kosher salt, and 1/2 teaspoon of the black pepper. Toss to combine.
Prepare 4 sheets of aluminum foil about the size of a quarter sheet pan, approximately 10 inches. Use heavy-duty aluminum foil or double wrap.
Divide the vegetable mixture among the 4 sheets of foil, leaving a 2-inch border on all sides. Season 4 boneless, skinless chicken breasts with the remaining 1/2 teaspoon kosher salt and remaining 1/2 teaspoon black pepper. Place a breast on each vegetable pile. Pour a 1/4 cup of barbecue sauce over each chicken breasts.
For each packet, fold the long sides of the foil to meet over the center, and then fold and crimp the short ends to create a sealed packet.
Grill cooking: Place the packets directly onto the grill grates, cover, and grill until the chicken is cooked through and the vegetables are tender, 20 to 25 minutes.
Oven cooking: Place on a rimmed baking sheet and roast at 425F for 20 to 25 minutes.
Let cool for 10 minutes before opening the packets and serving. When served, garnish with parsley (optional).