Since we know the momentum of a body is directly proportional to the mass and velocity of the body.
A heavy body will have more momentum as compared to a lighter body.
A hammer must be heavier to bury a nail deep because a heavy hammer will strike the nail with more momentum and it will transfer more force to the nail.
Hence a hammer must be heavier to bury a nail deep.