In order to buy life insurance on another person there must exist an insurable interest between yo and the person you want to insure.
Insurable interest basically means you stand to lose financially if the insured person were to die.
There does exist insurable interest between spouses, siblings, parents and their children, relatives, and business partners, among others.
Since you would have the financial responsibility of raising your child on your own if your child's father died, you do have an insurable interest in insuring him for life insurance. If he were to die he would no longer be able to contribute financially to helping you raise your child.
However, you would need his permission and consent to buy life insurance on him. In addition, he may need to answer some health questions, and/or take a medical exam, as well as, sign an application for life insurance.