It depends what type of insulin you take.
If it is fast acting insulin (e.g. NovoRapid), this is designed to start working within 20 minutes of injections. Therefore, you need to take it when you eat. When in a restaurant, I recommend waiting until the food is in front of you in case it is delayed. There is no reason why this cannot be taken at the table, I have been doing so for 20 years and usually it is not noticed as I inject under the table. People used to go off to the toilet to inject but this is not the most hygienic place to do a medical procedure.
If it is a long acting insulin (e.g. Glargine) which you take once or twice a day, you have more flexibility.