Anyone who has been given authority by a parent can reasonably discipline a child. So long as the spanking is reasonable it is not illegal. It is only a crime if the discipline becomes abusive and/or causes physical injury.
Below is the code section addressing this issue.750.136b Definitions; child abuse.
(1) As used in this section:
(a) “Child” means a person who is less than 18 years of age and is not emancipated by operation of law as provided in section 4 of 1968 PA 293, MCL 722.4.
(b) “Cruel” means brutal, inhuman, sadistic, or that which torments.
(c) “Omission” means a willful failure to provide the food, clothing, or shelter necessary for a child's welfare or the willful abandonment of a child.
(d) “Person” means a child's parent or guardian or any other person who cares for, has custody of, or has authority over a child regardless of the length of time that a child is cared for, in the custody of, or subject to the authority of that person.
(e) “Physical harm” means any injury to a child's physical condition.
(f) “Serious physical harm” means any physical injury to a child that seriously impairs the child's health or physical well-being, including, but not limited to, brain damage, a skull or bone fracture, subdural hemorrhage or hematoma, dislocation, sprain, internal injury, poisoning, burn or scald, or severe cut.
(g) “Serious mental harm” means an injury to a child's mental condition or welfare that is not necessarily permanent but results in visibly demonstrable manifestations of a substantial disorder of thought or mood which significantly impairs judgment, behavior, capacity to recognize reality, or ability to cope with the ordinary demands of life.
(2) A person is guilty of child abuse in the first degree if the person knowingly or intentionally causes serious physical or serious mental harm to a child. Child abuse in the first degree is a felony punishable by imprisonment for not more than 15 years.
(3) A person is guilty of child abuse in the second degree if any of the following apply:
(a) The person's omission causes serious physical harm or serious mental harm to a child or if the person's reckless act causes serious physical harm to a child.
(b) The person knowingly or intentionally commits an act likely to cause serious physical or mental harm to a child regardless of whether harm results.
(c) The person knowingly or intentionally commits an act that is cruel to a child regardless of whether harm results.
(4) Child abuse in the second degree is a felony punishable by imprisonment for not more than 4 years.
(5) A person is guilty of child abuse in the third degree if the person knowingly or intentionally causes physical harm to a child. Child abuse in the third degree is a misdemeanor punishable by imprisonment for not more than 2 years.
(6) A person is guilty of child abuse in the fourth degree if the person's omission or reckless act causes physical harm to a child. Child abuse in the fourth degree is a misdemeanor punishable by imprisonment for not more than 1 year.
(7) This section does not prohibit a parent or guardian, or other person permitted by law or authorized by the parent or guardian, from taking steps to reasonably discipline a child, including the use of reasonable force.