Yes, you can buy a life insurance policy for your ex-husband if you can prove to the insurance company that you have an insurable interest, which essentially means that losing your ex-husband would have some sort of financial impact on you.
Also, the application for life insurance needs to be signed by your ex-spouse. Without his signature, no company will go to the underwriting stage.
Life insurance coverage on an ex-husband is often negotiated before finalizing a divorce. This protects child support and any child maintenance payments in the event of the ex-husband's death, especially if he was the primary earner.
It's important to have the policy in effect before finalizing the divorce, with the ex-wife as the beneficiary and policy owner, to ensure that the beneficiary cannot be changed without her consent.
Different life insurance options are available depending on your ex-husband age. Basically the same if it were for anyone else.