If you're submitting your book to a traditional publisher, when is a good time to copyright your book? Before you give it to the traditional publisher? After they approve? Etc.
While law says you automatically own the copyright the moment the creation is fixed on a permanent medium (e.g. written), the judge of law is just a human, not omniscient: you need some way to show that you're the author. Registering your work in a way that is appropriate for your country (copyright office, notary) is a straightforward and fault-proof way to create such evidence, should it be needed.
It's best done ASAP - when you have the book, but before anyone else got a copy. Leaks or thefts happen, and once your work is "out in the wild" and you don't already have solid proofs in your hands, proving it was yours may become an uphill battle. If the work needs to be edited, or otherwise modified, the result is clearly a direct derivative of the registered work, so you don't need to worry about re-registering it - anyone trying to wrongly claim copyright on that automatically labels themselves as a plagiarist. Only if changes are so deep that new parts could stand on their own as separate works, you should consider re-registering the new edition.
Let me share a handy hint with you: assuming you live in a country where the Berne Convention for the Protection of Literary and Artistic Works is in place, you automatically own a copyright to your novel, assuming that (as stated) it is in a format that is perceptible either directly or with the aid of a machine or device. The only places which are not covered by this convention are in the middle east and some parts of Africa.
The only issue arises when someone has infringed upon your copyright and says that it is their own. The legal procedures behind this are vastly more complex, and subsequently not fit for a writing forum. Go to the legal stack exchange if your are interested.