In the First Punic War Rome did not actually declare war on Carthage. She intervened in eastern Sicily to help some mercenaries (the Mamertines) who had seized the city of Messana (the north-east of the island, modern Messina) who were attacked by Syracuse, the most powerful of the Greek city-states in eastern and southern Sicily. Rome defeated Syracuse and forced her to become her ally. At this point the Carthaginians mobilised for war because they were worried about the security of their possessions in western Sicily in the face of the power of the Rome-Syracuse alliance.
In the Second Punic War, Rome was forced to declare war because Hannibal, the ruler of the Carthaginian possessions in southern Spain, seized a Spanish city which was a Roman ally. Rome tried to negotiate with Hannibal, but this failed. Therefore, Rome had to declare war because she was supposed to protect her allies in Spain.
In the Third Punic War, Rome declared war because she wanted to destroy Carthage.