Taking medication while pregnant?

I'm just curious on what everyone's opinions are on taking any sort of medication while pregnant? Antidepressants, sleep aids, etc? I am prescribed meds by my doctor for certain things, but just wondering what everyone thought about it.