Especially if you are someone who is entering a PhD with very broad interests and little depth of knowledge in your field.
If you are talking about the writing of a formal proposal document, the rules vary from department to department. If you are talking about the idea for a project, then that needs to be developed very early on—the tentative idea should already be in place by the time work starts.
In my department, for instance, students had roughly one year from the completion of the qualifying examination to submit the research proposal. This was a fairly substantial document (25-30 pages). Other schools I considered required the submission as late as the third or fourth year (in what was nominally a five- to six-year program); in that case, the research proposal was almost a first draft of the thesis, as it was typically anywhere from 50 to 100 pages in length!
In my current department, students receive fellowships to work on projects with their advisors. In such cases, the advisor typically plans the basic outline of the project, and the start of the work plan. Later years are left for the student to devise.
For PhD in the United Kingdom:
It is not uncommon for students submit a PhD research proposal as part of their application for the PhD program. They can also find a supervisor to work on the research proposal together before submitting it as part of their application.
I have applied for a PhD in another field before and was able to write a proposal in 2 weeks that was good enough to get an interview for the program. This was with the help of a supervisor who gave me the research area, open problems he is interested in, relevant literature and he read several of my drafts.
In the department where I got my degree at, the proposal was expected in the third year, had to represent about 30% of dissertation work, and qualified as a Master's defense should the student drop out of the program and yet being able to walk away with something in hand. In the department where I worked, the proposal was expected half a year before the defense (i.e., in the fall of the fifth year), had to constitute about 80% of the work, and basically was a rehearsal for the job market talk (the winter of the fifth year). So yes, rules and traditions vary from department to department and from discipline to discipline. Ask your Director of Graduate studies (or chair if the department does not have a designated officer for this role) as to what the expectations are.