One answer to this question is: Whenever you are about to invest a significant amount of time and money into your branding/corporate identity. The earlier, the better, as rush jobs will naturally cost you more.
You also want to make sure you hire someone that really knows and understands trademark law, not just an attorney who files trademark applications as part of his or her overall law practice. It is true that filing a trademark application is fairly simple, but having expertise matters the most when the application process goes less than smoothly, which is a somewhat regular occurrence.
This is the situation I want business owners to avoid: you pay a designer to develop product packaging for a new line of goods. Then, before contacting a trademark lawyer, you have a printer print 35,000 labels. Or worse, you contacted a non-expert who conducts an inadequate search, and then “OK’d” the design (without knowing that the severity of the situation requires them to use a third party professional search report), and then print the 35,000 labels. Months pass by, and the US Patent and Trademark Office denies your trademark registration because there’s a company in Iowa with similar product packaging, and that company is now opposing your trademark too.
This is what I want you to avoid.