The answer to this question depends upon the time period. In the Persian Wars, in the first third of the fifth century BCE, Athens and Sparta were begruding allies who cooperated to help repel the Persian invasion of mainland Greece.
After the Persian Wars, relations between Athens and Sparta deteriorated and the two city-states found themselves at odds with one another throughout virtually all of the rest of the fifth century BCE. Because these two city states were the most powerful in Greece at the time, many other city states allied themselves with one or the other.
Generally speaking, Athens' allies seem to have been fairly unwilling to help Athens. Oftentimes, they helped Athens oftentimes because they were forced to do so. After the Persian Wars, many Greek city states joined the so-called Delian League, which originally began as a coalition designed to stave off any further threats from the Persians. Participants in the League, in which Athens become the leading force, contributed either money or ships. As time went on, though, and the threat from the Persians diminished, some city states wanted to leave the League. Athens, however, having grown accustomed to the inflow of revenue from the contributing city states, did not want to allow these states to leave. Thus, in some cases, Athens would force these states to continue their payments to the League. Originally, the treasury for the League was on Delos (hence the Delian League), but eventually it was moved to Athens itself.
As for Sparta's allies, many city states sided with them because they were of similar Peloponnesian heritage. These city states were primarily in the southern half of Greece. Additionally, various city states joined the Spartan cause in the Peloponnesian War because they were afraid of the rising power of Athens. Whereas the Athenians had turned the Delian League into sort of a "protection racket", whereby the Athenians would supposedly use the other city states' contributions of money and ship to protect League members from the Persians, the Spartans often became the protectors of those who were trying to get out from under the thumb of the Athenians.