However, in order for one person to buy life insurance on another person, there must exist an insurable interest in the person you want to insure.
This means, you stand to lose financially if the insured person were to die. For instance, maybe you would no longer receive financial support from that person, or you might have to pay for the person's burial, etc.
There does exist insurable interest between spouses, siblings, parents and their children, business partners, etc.
So, yes, you could buy life insurance on your grandmother; however, you would need her permission and approval. In addition, she would have to sign the application for life insurance and may have to answer some health questions, and/or take a physical exam to qualify for the life insurance policy.
Here's an article that explains over 70 life insurance plans and how you can get a free quote online.