Here's my two cents.
Try to have kids in medical school except during 3rd year. Because during year 1-2 you are not really on the wards. During year 3 you are part of the wards, most of your most important grades come during this time and the learning curve is very steep. 4th year is nice because it is usually flexible and you can have a pretty easy year if you schedule things right. I think that having a child during 4th year towards the end is an ideal thing. Just make sure you have baby sitters lined up for internship! or alternatively you can take a year off right at the end of 4th year and enjoy a whole year with your child (if time
and money allow).
Having a baby during internship year is about the worst thing to do. Internship will be intense in almost every field (I will get to the exceptions). The exception being pathology (although this maybe changing given the residency was shortened from 5 to 4 years).
I think having a child in your senior year residency in most specialties excluding surgical ones can be a good idea, especially if the year is tailored correctly.
There are shared positions which allow time off to be with your children. If you can work it out with someone else to work 6 months and then the other person work six months that would be ideal. Although the timing could be tricky. If you could get pregnant at the beginning of the six month period when you work, that's probably a good thing.
Lastly the following specialties would be conducive to having children (with outside help of course).
So those specialties with a required internship year, forget about having a child that 1st year.
Condusive specialties to having children during residency with a required PGY-1/Internship year: Derm, Radiology, Nuclear medicine, Psych (6 months), opthamology, PMR, Radiation Oncology, and maybe anesthesiology, EM.
Condusive Specialties to having children without a required pgy-1/internship year: Pathology and maybe EM.
Specialties to avoid having children during residency: Most surgical fields except opthamology but including ob/gyn and Peds, IM, FP, Neurology. The only exception is that in peds, im, fp you maybe able to schedule your last 6 months as outpatient rotations without the responsibilities of the floors and able to have a child at the end of residency. Otherwise, it's usually too much.
After residency is done, I believe the following fields will allow you to work and still be home at a reasonable hour consistently over time: Derm, Anesthesiology, Path, Rads, Nucs, Rad Onc, PMR, EM (although working nights screws up your sleeping schedule), opthamology. Also, Peds, IM or FP, Ob/gyn (if you do only office gyn), Neurology (especially if you are doing mainly movement disorders, EMGs, EEGs, sleep studies, etc) if you work for an academic hospital and/or admit to a hospital with house staff (residents). This makes a WORLD of difference. However this may limit your practice area to those places that have house staff (residents) 24/7 covering your patients until the morning. Lastly, if you go IM, FP, Peds, ObGyn (doing gyn), or Neurology make sure you join the largest group practice possible so that call can be spread out over the most group partners (docs) possible.
Also there are some specialties like rads, nucs, anesthesiology, rad onc, EM etc that will allow you not to take call. You may never be made a partner in the practice and thus will always make substantially less than the partners, but at least you're not on call and do not have that disruption in your life. Again this is all dependent on how flexible the group you join is willing to be. Also, if they find someone willing to take call and the work stays constant you will be the first one out the door, so to speak. There are always trade-offs in life. Choose wisely.
Let the flames begin. Enjoy my two cents for what they are worth.