There are many reasons your child's hand may hurt when writing. Typically, it is from decreased strength. The hard part is that the strength isn’t just from the hand. It is from the core, shoulder, forearm, wrist, and then hand. All of those areas need to get strengthened.
Learning how to write or how to improve your writing does not mean you need to sit and practice writing letters for hours at a time!