Anytime as soon as you both get all the forms filled with all required supporting documents. Just make sure to check carefully all the necessary requirements needed and read thru the guide via CIC website.
I think you could submit it as soon as. If you don't want to change your surname and get away from all the paperwork. You could totally file the application after getting married. I had to change my IDs and passport since I wanted to use my husbands surename; then after getting busy with all the changes, we got busy with the paperwork for immigrations.
We started the app process a month before our wedding because we both knew how much time it would take. And we were doing outland so we wanted it sent off ASAP.