Your age is one of the considerations. Likewise, think about when your mortgage term ends, your youngest child finishes college, and your spouse plans to retire. Your term should be long enough to cover these occasions.
Think about your own financial stability as well. If you put away a lot of money every month, you might be able to get by with a shorter term on your insurance policy; you'll have to use your savings much sooner.
The cost of your insurance is a final factor to think about. The decision may be influenced by the fact that longer contracts have higher monthly costs than shorter ones.