It is advisable that you apply for a visa one month before your intended date of entry into China but not earlier than three months. The Chinese visa(mainland only) is typically valid for three months. If you apply for a visa too early, the visa may expire before your departure. For instance, if you plan to enter China on July 1, the best time to submit your application would be around June 1 (counting working days only).
Please note that the validity of some visas is equal to or shorter than one month. In that case, you may apply for the visa around two weeks before your intended date of entry into China.