You want a box with volume=128=length x width x depth.
128=2^7. How many ways can we split 7 so that a+b+c=7? where a, b, c are integers.
1+3+3, 2+2+3, 1+2+4, 1+1+5. Of these 2+2+3 seems to be the best distribution of dimensions, so the box dimensions are 2^2, 2^2, 2^3 which is the same as 4 x 4 x 8, a square box twice as long as it is wide. (Other boxes could be 2 x 8 x 8, which is a square box with a depth of 2, 2 x 4 x 16 a long box, 2 x 2 x 32 a very long narrow box, etc). Choose the box you think would make the best design to fit the candies. Personally I think I would go for 2 x 8 x 8 because it looks quite large even though it is not very deep. The 8 x 8 lid of the box when raised would reveal lots of candies. Perhaps it would contain 2 layers with 64 candies in each layer.
This question has no single correct answer. They just want to see how you would approach the problem.