Preheat oven to 400°F and line two baking sheets with parchment paper.
Unroll one sheet of puff pastry and spread pesto evenly over the surface. Sprinkle with mozzarella and Parmesan cheese.
Place the second sheet of puff pastry on top and press down gently to seal.
Using a Christmas tree cookie cutter (about 4 inches tall), cut out tree shapes from the pastry. Re-roll scraps as needed to make about 12 trees.
Place trees on prepared baking sheets and brush tops with beaten egg. Use a knife to make small horizontal cuts along the sides to create "branch" details.
Bake for 12-15 minutes until golden brown and puffed. Top each tree with a small star cut from red bell pepper or a halved cherry tomato. Serve warm.