Preheat the oven to 350°F (175°C) and line the muffin pan with paper cupcake liners.
In a medium bowl whisk together the flour, baking powder, and salt, then set aside.
In a large mixing bowl beat the softened butter and granulated sugar with an electric mixer until pale and fluffy, about 2–3 minutes.
Add the eggs to the butter mixture one at a time, beating well after each addition.
Mix in the vanilla extract, lemon zest, and lemon juice until combined.
In a small bowl stir together the milk and sour cream until smooth.
Add one-third of the dry ingredients to the butter mixture and mix on low just until combined.
Add half of the milk mixture and mix briefly, then repeat alternating dry ingredients and milk mixture, ending with dry ingredients and mixing only until just combined.
Scrape down the sides of the bowl with a spatula to ensure the batter is evenly mixed, being careful not to overmix.
Divide the batter evenly among the 12 cupcake liners, filling each about two-thirds full.
Bake the cupcakes for 16–18 minutes or until the tops spring back lightly when touched and a toothpick inserted in the center comes out clean.
While the cupcakes bake, combine lemon juice, sugar, and water in a small saucepan over low heat, stirring until the sugar dissolves, then remove from heat and cool slightly.
Transfer the baked cupcakes to a wire rack and immediately brush the warm tops with the lemon syrup, then let them cool completely, about 30 minutes.
For the frosting, beat the softened butter and cream cheese together in a large bowl until smooth and creamy, about 2 minutes.
Gradually add the powdered sugar, 1 cup at a time, mixing on low speed until fully incorporated and smooth.
Beat in the vanilla extract, lemon zest, and 1 tablespoon lemon juice, then add more lemon juice a little at a time until you reach a spreadable consistency.
If using, add yellow food coloring drop by drop, mixing until a sunny shade is achieved.
Once cupcakes are completely cool, transfer the frosting to a piping bag fitted with a star tip or use a spatula to swirl frosting generously on top of each cupcake.
Sprinkle yellow sanding sugar and white sprinkles over the frosting to create a sunburst effect, if desired.
Chill the frosted cupcakes for 10–15 minutes to help the frosting set before serving.