When a child is born in another country while on a military base or to American parents, the right paperwork must be filed to help that child obtain citizenship. It is an automatic right, but the correct legal paperwork still has to be filed.
If a child is born out of the U.S., then at least one parent must be a U.S. citizen at the time of the child's birth for the child to obtain immediate citizenship rights. If the parents aren't married, then it's important that the mother was a U.S. citizen and had been in the U.S. for at least a year before the child's birth. If the father is the U.S. citizen, he will need to have lived in the U.S. or been in the military for at least five years before the child's birth. Paternity must be established, and DNA testing might be required. In each case, it's important to file for a child's citizenship before he or she turns 18.
In some cases, your child could be eligible for dual citizenship. Not every country allows this, so it's important to understand if the country where your child is born allows your child to have two nationalities. If not, you may have to give up the right to citizen in one country. Dual citizenship does have some drawbacks, like potentially owing taxes in more than one country or having to abide by different sets of laws. Some people may have to serve in the military in one country while not in the other, too. If dual citizenship is an interest you have for your child, you will want to know all the legal implications of that decision before you go through with the paperwork.
Source: FindLaw, "Military Children Born Abroad," accessed Sep. 19, 2017