Why do I pee when I cough?

Stress incontinence. Stress incontinence or unwanted leakage of urine with activity, strain, cough, etc. Is an unfortunately common problem for women as they age. More common after childbirth, it is commonly the result of decreased resistence in the urethra resulting in urine leakage when you don't want it. There are options for treatment, you should discuss this with your doctor who may refer you to urologist.
Poor support. Loss of urine with activities that cause an increase in the pressure inside the abdomen can be caused by lack of support of the bladder and urethra. Some options for treatment include kegel exercises to strengthen pelvic muscles, use of a pessary (http://en.Wikipedia.Org/wiki/pessary), and surgery to resupport the fallen structures. Discuss with your gyn to determine which is right for you.