I’m thinking it may all depend on the circumstances and the age of the child. Several scenarios come to mind.
#1. A child has cheated or lied and has been plagued by guilt. Accepting the consequences of the offense (0 as a grade, etc.) is usually appropriate. Depending on the amount of time since the offense, it may be just as appropriate to recognize their apology and not mete out consequences.
#2. A young child who uses the “confession” as a way of getting around punishment. He/She is not really feeling guilt about what they did but have figured out that if they “confess” they won’t be punished. In that case, I’d feel that some type of punishment is necessary. (Especially if it is a repeat offender.)
Depending on the situation, some retribution may be in order. I don’t think it should be punishment for the sake of being punished but often our sins do carry consequences.