I'm guessing it is best to put it when you enrol. Since you are not in Australia, you should get it done asap. I'm guessing you have until the census date (which is independent for each uni and maybe even course (not sure)). The census date is the date that everything is finalised and you are officially enrolled in a course and eligible for HECS-HELP or else you have to pay upfront or lose a position in the course.
Don't panic, the census date is usually a few weeks after the course has started.
But still, oncce you get back, apply for a TFN, which will give you the opportunity to have your TFN in before your course starts.