Preheat oven to 350°F (175°C). Line two baking sheets with parchment paper.
In a large bowl, whisk together flour, baking powder, baking soda, and salt.
In another bowl, cream together 0.5 cups butter and granulated sugar until light and fluffy.
Add egg and vanilla extract to the butter mixture and mix until combined.
Alternately add the dry ingredients and buttermilk to the wet mixture, beginning and ending with dry ingredients. Stir in rainbow sprinkles gently.
Drop rounded tablespoons of batter onto prepared baking sheets spaced about 2 inches apart.
Bake for 12-15 minutes or until the edges are set and a toothpick inserted comes out clean. Cool completely on wire racks.
For the filling, beat the softened butter until creamy. Gradually add powdered sugar, then vanilla extract and heavy cream. Beat until light and fluffy.
Spread or pipe the filling onto the flat side of half of the cookies and sandwich with the remaining cookies.
Serve immediately or refrigerate until ready to serve.
Notes
For best texture, allow the whoopie pies to chill for at least an hour before serving to let the filling set.