What is the right time to start a website for your book (or perhaps for you as an author, assuming there will be more books in the future)?

Instinctively, I would say maybe once your book is sold to a publisher, but I have read things along the lines of "it's never too early!". Really? What about if you have a completed MS but don't even have an agent? Maybe I am not understanding all of what the website is supposed to accomplish. Thoughts?