Mrs it will depend on what is causing the miscarriages. Have both happened at the same gestation? Do either you or DH have other children? Any family history of infertility?
They say that the overall chance of miscarriage is something like 20% per pregnancy. So it's not outside the realms of possibility that it can just be bad luck, even happening twice. I believe that is why they wait until you've had three in most cases to do any testing, because two can be bad luck, but three points to something specifically preventing a pregnancy from going any further.
As to what that might be. It can be several things. You know that you can get pregnant, so that's part of the puzzle out of the way. Your DH's swimmers can swim, and in the right direction, your womb isn't overly hostile, you don't have such severe genetic issues that the fertilised egg is being immediately rejected.
So it must be that either your womb/cervix isn't able to hold the embryo or support the embryo in some way, OR that there's some genetic issue which is causing the development to become halted at some point. Genetic thing can be caused by either of you being a carrier for something, or it can be that your body has too relaxed of an entry policy, and is letting in any old sperm, rather than the best ones.
In our case we know what the cause is - DH has a balanced translocation which in effect means he's a "carrier" and has either 50% or 25% chance of passing on a gene which affects development at that specific level. (We don't know which, which is why I want testing, but it's not overly urgent). So we have the normal 20% chance of miscarriage + 50 or 25% of the other 80%, which means 40% chance or 60% chance overall. That's an extremely rough estimate, and might not be accurate because the 20% probably includes people with the same issue that we have anyway. But 2 or 3 out of 5 compared with 1 chance out of 5 means it's more likely for us.
However, even when this is known, all they are likely to say (in our case) is keep trying. We have decent odds (40 or 60%) of a healthy pregnancy too, so it's not worth doing any invasive treatments. If it turned out it was a different issue which was much less likely to result in a successful pregnancy, then they can do things to change the odds, and the good news is that in most cases, especially when it's a problem with the womb or the mother's hormones they can do things to help regulate that. When it's a genetic issue, it's less clear cut and more invasive, but there is always the option of IVF with PGD which is where they screen the embryos to check they are genetically healthy and then implant healthy ones only. This is the route we would probably go down if it turns out to be impossible to conceive otherwise, but I hope we don't have to go there, because I think it's quite stressful and painful. At this point, we just need to wait and see.