Roll out half the gingerbread dough thinly on a lightly floured surface and cut out a neat 36 x 18 cm (14 x 7 inch) rectangle. Carefully lift on to a baking sheet lined with nonstick baking paper and trim the edges of the rectangle. Using a ruler, cut the dough into 8 exact 9 cm (3¾ in) squares. Using a 7.5 cm (3¼ inch) star cutter, remove a star shape from each square (cook the stars separately if desired). Repeat with the second batch of dough on a second baking sheet.
Bake the squares in a preheated oven, 180°C (350°F), Gas Mark 4, for 5 minutes. Remove from the oven and scatter the crushed sweets into the cut-out star areas. Return to the oven for an additional 8–10 minutes until the gingerbread is lightly coloured and the sweets have melted to fill the stars. (If they haven't completely spread into the corners, use a cocktail stick to spread the syrup while it is still soft.) Re-cut the edges of the gingerbread squares to neaten them, then leave them on the baking sheets to cool.
Put the royal icing in a piping bag fitted with a plain nozzle. Pipe a line of icing along an inside edge of 4 of the cookies and press together to make 4 sides of a box shape. Make 3 more box shapes in the same way. Use the remaining icing in the bag to pipe decorative lines around the edges of the boxes. Leave in a cool place to set for at least 2 hours.
Place a nightlight on a small mat or coaster, light it and lower a gingerbread box over the top.