The blood type of the baby is determined by the genes it has inherited from the mother and the genes it has inherited from the father, and so the baby will be genetically different from the mother that is carrying it.
Diseases such as HDN (Hemolytic Disease of the Newborn) or erythroblastosis fetalis are caused by the mother being sensitized to produce antibodies to the baby’s red blood cell antigens when blood crosses into the mother’s circulation at delivery (sometimes before). Sensitization can only occur if the blood type of the baby’s blood is different from the mother’s, otherwise she will be producing antibodies to her own blood.
HDN is rarely seen today because it is preventable in the most common instance, which is when the mother is Rh negative and the baby is Rh positive, by administering a product known as RhoGAM to the mother at 28 weeks and at delivery.
When you state that both parents share the same blood group, I am assuming that you are referring to the ABO and Rh type, such as A negative. This is the overly-simplistic view of blood grouping from high-school biology. In actual fact, there are several different versions of A antigen, and you can be A2 and have anti-A1. These are the two most common versions of “type A” blood, and there are over a dozen more, and other versions of the other blood types as well. In addition, Rh negative refers to a particular antigen in the Rh system, also known as “D.” There are C, c, E, e and quite a few others that are clinically significant. There are also more than 30 other blood groups with a total of greater than 300 different antigens, many of which are capable of inducing the mother to produce antibodies and causing HDN.
When you are asking about a man and a woman of the same blood group, it is unlikely that they will both have the exact combination of antigens on their red blood cells. So yes, even if they are both “O” or both “AB,” there is still a wide variety of possible differences that can lead to problems.