What effect did the military have on ancient Rome, including the Republic and its fall as well as the Empire and its fall?
Great question. The Roman army was one of the main reasons why Rome became great and ironically one of the reason why Rome failed as well.
During the Republic, Rome conquered all of Italy, Carthage, and the Hellenistic kingdoms chiefly through military conquest. Rome proved to have a superior army. They were more disciplined and dedicated. Part of the reason for this was due to a citizen army. Unlike most people in the ancient world, Rome did not hire mercenaries. At one point, the army became so strong and independent that they started becoming loyal not to Rome, but to individual generals. Hence, towards the end of the Republic and even before there were several civil wars. For example, the war between Pompey and Caesar cost many lives.
During the time of the Empire, the army gained even more power. At one point, the army realized that they could even elect Emperors. Might made right. On account of this, there was even more violence. From this perspective, Rome's army lead to both the rise and fall of Rome.