When may a PhD student start publishing?
There's absolutely no single timeline for publishing papers. I've had students publish papers as first author in the first year of their PhD, and I myself didn't publish a paper until I was a fourth-year grad student, because I was working in a relatively new field and had to work out all the kinks and issues before I could start writing things up.

Research projects are unique, and have their own respectively timelines. Publish when you have something worth publishing, rather than waiting for some arbitrary clock to go off.