Light-generating hammer