One very important consideration for this and all other non-experimental studies: correlation does not imply causation. In other words, just because two things happen together does NOT mean one causes the other. Here's a great video explaining this idea.
In the case of whether or not expecting parents marry, there are several reasons the parents who marry might have better outcomes (more stable marriages, do better financially, and have healthier babies, etc., as quoted in the article you referenced). One possibility is that getting married before the baby is born causes these positive outcomes. Another very plausible explanation is that couples who are happier, more supportive of each other, more committed to each other and their family are more likely to get married right away when they find out they're pregnant. I've had exactly that happen to friends of mine, actually. They were in a great relationship, and they planned to get married and start a family eventually, they just got pregnant a little ahead of schedule. ;) Not everyone with an unplanned pregnancy is in a loving, committed relationship, though --- some people definitely won't want to marry their co-parent at all, or might eventually but don't feel ready to early on. It makes sense that someone who has a loving, committed partner would have a better outlook financially, emotionally, etc. after an unplanned pregnancy than someone with no partner to rely on, or with a partner they have mixed feelings about. If that's the case, then whether or not they get married might not actually make a difference.
That article frames the evidence in a way that suggests that the act of getting married is improving the odds for those couples, but it's just as plausible that the couples who are more likely to get married had better odds to begin with. Getting married might be more like a side-effect of the actual cause, which might be something like "having a loving and committed partner."
That may seem like splitting hairs, but it's actually a really important distinction to keep in mind. Think about what advice you would give a friend who discovers she's pregnant based on the article's implications, or based on the reasoning I just provided --- probably really different advice. An article like this can make it seem like someone with an unplanned pregnancy should get married to the co-parent and if they don't they're damning the baby's future and their own. That conclusion is not at all supported by the evidence cited in the article.