There's really no pre-determined age when it suddenly becomes necessary to take out a life insurance policy. However, if there are people who depend on your income - especially children or a spouse - there's a major benefit to taking out a policy when you're young. When you take out a policy in your 20s or 30s, the provider takes into account that you're paying premiums for a number of years when, statistically, there's relatively little risk that they'll have to pay out. Unfortunately, that risk goes up a little with each passing year. It stands to reason that younger policyholders can lock in lower premiums than the aged.
However, it doesn't necessarily follow that every 25-year-old should run out and get insurance. From a financial standpoint, it really doesn't make sense unless you already have dependents. Even if the policy has an investment component - as is the case with whole life products - much of the premium is going toward insurance that you don't really need. You're probably better off putting that money directly into an investment account.
You should go out and get life insurance when you have people who are dependent on you. A few life event to consider are getting married, getting pregnant (including your significant other getting pregnant for men), buying a house.
If you have some of the above life goals, home, marriage or kids, and have a family history of illnesses, or are relatively healthy but have some health issues, you may want to be a bit more proactive and look into insurance on the earlier side. You may end up saving your money in the long run or ending up without the ability to obtain the appropriate coverage to insure your family.
Hope this helps,
David Rae CFP