Islamic State on Saturday claimed responsibility for a suicide bombing on a Shi’ite Muslim mosque in eastern Afghanistan that killed 39 people and wounded at least 80 others.