Preheat your oven to 375°F (190°C) and line baking sheets with parchment paper.
In a large bowl, cream the softened butter and sugars until light and fluffy. This will take about 3-4 minutes with an electric mixer.
Beat in the eggs one at a time, then stir in the vanilla extract.
Whisk together the flour, baking soda, and salt in a separate bowl. Gradually add the dry and wet ingredients, mixing until just combined.
Fold in the M&Ms and chocolate chips (if using) with a rubber spatula. Be gentle to avoid breaking the candies.
Scoop the dough into rounded tablespoons and place them on the prepared baking sheets, leaving about 2 inches between each cookie. You can gently press a few extra M&Ms onto the tops of the dough balls for decoration.
Bake for 8-10 minutes, or until the edges are golden brown and the centers are slightly soft.
Let the cookies cool on the baking sheets for a few minutes before transferring them to a wire rack to cool completely.