Yes, life insurance is allowed according to our leading scholars because it is taken as what is known in jurisprudence as (هبة مشروطة) ( Conditional gift) because of the agreement between the costumer and the insurance company that he gives to the insurer a certain amount ( premium) with a condition that the insurer must give him or his family a certain amount if any thing happens to him or his family, etc.
Wassalam.