I just signed up on this forum to answer THIS question! My son also has really bad handwriting, but it's gotten better. Where we live, a lot of people send their kids to occupational therapy to work on fine motor skills and so forth. I used several different techniques, including one called "retrain the brain" where the child does exercises to music, and they are helping.
I'm reading a book right now that I would recommend to ANYBODY without reservation. (And I have about 30 books about this stuff at home.) This book is by Sally Goddard and she explains how infant brains develop, and how some of the reflexes from infant development can affect everything from emotional to balance, handwriting, reading, and so forth.
The book is called "Reflexes, Learning, and Behavior" and I am buying several copies to give to people.
There are tons and tons of websites that reference the idea that "retained reflexes" can get in the way of normal development, but this book explains to you from the beginning, how infants brains develop. It's an extremely logical, and medically-grounded approach. She also tells you what exercises you can do to "integrate reflexes." With my son, we found that pulling back, doing exercises and some reflex work, and then trying later on had a HUGE effect. Made sense. We fixes the underlying issues.
I've been using movement on my son now for two years. Different therapies, since I couldn't find an OT to hire. (We live in the silicon valley where a LOT of the kids are quirky and apparently, everybody takes OT!). I found it ridiculous that my kid had to suffer because the OT's were busy, so I started researching different types of movement therapy, from all over the world. Guess what? MOST of them are founded on the stuff that Sally Goddard talks about. Or they should be. Because if you don't deal with the retained reflexes, it's MUCH harder to teach a child things that rely on them.
Here's a link that gives an overview of some of the reflexes. I have to laugh because I found this link on a UK forum, and it belongs to a trainer that I brought to our area last year! She's in Seattle and will travel to areas if you find enough people who will take her class. (She didn't charge me anything as the organizer.) Her name is Sonia Story.
If you are in different parts of the country or world, there are other trainers available. One of the trainers I was talking with several years ago is now working at this place, in the US south.
Seriously, though, the best thing to do is to buy the book.