Preheat the oven to 375 degrees F. Line two baking sheets with parchment.
For the coconut cakes: In the bowl of an electric mixer fitted with the paddle attachment, beat the butter and brown sugar on medium speed until light and fluffy, 3 to 4 minutes.
Add the eggs one at a time, scraping the bowl and beating well after each addition. Beat in the vanilla extract and coconut extract if using.
In a medium bowl, whisk together the flour, baking powder and salt. Add about half the flour mixture to the mixer bowl and mix on low speed to combine. Scrape the bowl well with a rubber spatula. With the mixer on low speed, add the buttermilk in a slow, steady stream and mix until incorporated. Add the remaining flour and mix on low speed to combine. Scrape the bowl well, then mix in the coconut on low speed.
Use a 1/4-cup (2-ounce) scoop to scoop mounds of batter onto the prepared baking sheets, staggering the cakes and leaving at least 2 inches of space between each. (You should have 16 scoops.) Bake until the cakes are lightly golden around the edges and the centers spring back when gently touched, 18 to 20 minutes. Cool completely on the baking sheets.
For the filling and assembly: In the bowl of an electric mixer fitted with the paddle attachment, beat the cream cheese, butter and confectioners' sugar until light and fluffy, 2 to 3 minutes. Add the marshmallow creme and mix to combine. Transfer the mixture to a piping bag and cut a 1/2-inch opening at the tip.
Flip over 8 cakes and pipe filling onto them, stopping about 1/2 inch from the edges. Sprinkle a little coconut on top of the filling if desired. Top each with one of the remaining cakes, pressing gently so the filling reaches the outside edges. Refrigerate for 15 to 30 minutes to allow the filling to set.
Serve immediately or store the whoopie pies in an airtight container for up to 2 days.