OnAfterSalesInvLineInsert means
the code that you put in the event will be triggered after the sales line was copied to the sales invoice line
if you check the codeunit 80, you will find that the system creates gl entries, customer ledger entries, vat entries, item ledger entries, and sales invoice line entries. So, if you choose to put your code in that event, let's say you are making sure that it has been validated first that everything could be registered correctly without errors and without allowing false executions and this is different if you use OnBeforeSalesInvLineInsert.
this last event allows you to calculate values before the sales invoice line is created so you can calculate any value and then, add this new value to the sales invoice line, as an example, you want to calculate the commission prior to insert the invoice line because you want to add that calculated value to a new field in that table.
what im trying to say is,
you need to choose the event depending on what you are trying to obtain, if it is already calculated or not and if it is already "registered" (validated) or not