A certain medication I took that my doctor prescribed to me gave me a really bad rash now my skin is hyper pigmented. Could I sue the doctor?

No. You can sue for anything. The real question is should you. Unless your doctor new you had an allergy to this medication and gave it to you anyway there is no reason to sue. There is always a chance of having a side effect from any medication you take. Your doctor does not have a crystal ball and cannot be sure ahead of time.