I'm pretty sure it's safe at all phases of pregnancy... unless you have specific medical conditions. I don't know what they are.. but if you are having a normal pregnancy, I would say don't worry about it. I am 6 weeks along and DH and I have been having sex with no problems. The baby is pretty well protected!
You should probably not have intercourse if you have unexplained bleeding at any time during your pregnancy.
If you have a history of first trimester m/c or show signs of one. I fall into this category and didn't realize that it probably was not smart to have sex the first three months. I did though and I am happy to say all is well. But you really must be careful.
During the last 8-12 weeks if you have a history of pre-term labor or are experiencing signs of early labor.
If your water breaks (obviously).
If you have placenta previa (when the placenta is located over the cervix).
Or in the last trimester if you're carrying more than one fetus.
Otherwise I would think it would be safe. But again it all depends on how you feel during and after.