Dear student.
This is due to the reason that, there is no air in moon, as a result of which there will be no air resistance. The little gravitational force that is present in moon acts equal on both hammer and feather, so hammer and a feather landed together.
Regards.