In a large mixing bowl stir together flour, ground hazelnuts, poppy seed (if using), and baking powder; set aside.
In a large mixing bowl beat margarine and granulated sugar together with an electric mixer on medium to high speed until fluffy. Add egg and the 1 teaspoon vanilla; beat until combined. Add flour mixture; beat on low speed until combined. Cover and chill dough at least 3 hours or until easy to handle.
On a lightly floured surface, roll the chilled dough to 1/8- to 1/4-inch thickness. Using 2-inch cookie cutters, cut dough into desired shapes. Place cutouts about 2 inches apart on an ungreased cookie sheet.
Bake cookies in a 375 degree F oven for 8 to 10 minutes or until golden. Cool on a wire rack.
For apple icing, in a medium mixing bowl stir together powdered sugar, the 1 teaspoon vanilla, and enough apple juice to make a glaze. Divide in half. Tint half of the icing with blue food coloring; leave other half white. Decorate cooled cookies with white and blue apple icing. Makes about 36 cookies.
Test Kitchen Note:
When selecting margarine for baking, be sure it contains no less than 70 percent vegetable oil and that it is called margarine on the label. For most cookie baking, do not use any product called a spread or those products labeled diet, whipped, liquid, or soft. They have a high water content and do not give satisfactory baking results.