What countries were involved in the Peloponnesian War?

There were no 'countries' in today's sense of the word. Greece comprised hundreds of independent city-states which from time to time banded into defensive alliances.

The Peloponnesian war was between Athens and its allies and Sparta and its allies. The city-states stretched from Sicily, through mainland Greece, to the Aegean Sea and Asia Minor.

Late in the war Persia provided financial support to the Spartan league to enable it to match the dominant Athenian fleet, resulting in Athens' defeat.

About 300 Greek city states stretching from Sicily to Asia Minor, aligned with either Athens or Sparta.