Just a few decades ago, the Persian Empire had fought a bitter conflict against the Greek city states. What would make Persia join Spartan against Athens? What would make Spartans trust Persia when they had been such bitter enemies? Also, to what extent did Persia contribute to Sparta's victory?
The interaction between these states is pretty complex, but the basic fact is that Persian policy regarding the Greeks was about pacifying the western fringe of the empire and bringing the western coast of Asia Minor back into the Persian fold. Above all, this meant that no Greek state could be allowed to build up their power to the point where they could provide serious resistance.
Sparta had actually left the anti-Persian alliance of Greek states as early as 478 BC, leaving the job of dismantling the Persian presence in the Aegean to the Athenians. These were very successful at pushing the Persians back throughout the 470s and 460s, and gradually turned the alliance into an Athenian empire. For the Persians, Athens was definitely the main threat to the stability of their western satrapies - especially given their invasions of Cyprus and Egypt in the 450s, which threatened lands more important to Persian power than the distant west. When war broke out between Athens and Sparta, the Persians naturally saw the Spartans as an agent who could restore the balance of power in the Greek world and take the pressure off Persia. This would allow the Persians to be the laughing third, snatching up whatever Athens could no longer hold.
In addition, there is the fact that the Athenians seem to have supported the satrap Amorges in a rebellion against the Persian king in 412 BC, in the hope of securing a lasting financial backer. Amorges was crushed, and the Persians were understandably miffed that the Athenians had supported him; it was around this time that they actually decided to support the Spartan cause. However, we know very little about the details of the Athenian alliance with Amorges, because Thucydides decided not to discuss it.
All that said, the actual policy of the western satraps was one of opportunism. Their divide-and-conquer strategy meant that they had to find a balance between funding the weaker party in Greek-on-Greek wars and making sure the party they supported did not become too strong. The initial support offered by the satrap Tissaphernes to the Spartans was half-hearted, and the Athenians maintained hopes of securing it for themselves by making diplomatic overtures to Tissaphernes. Pharnabazos, satrap of Phrygia, was somewhat more helpful, but still offered no structural and substantial support, no doubt out of fear that it would simply replace the Athenian threat to Persia with a Spartan one. It wasn't until the arrival of the king's brother, Cyrus the Younger, in 408/7 BC, that the Persians became the unambiguous backers of Sparta in its ongoing war with Athens.
The influence of Persian support was massive. No Greek city-state could easily bear the financial burden of building and maintaining a large fleet; the sheer cost of naval war meant that the Spartans had the Athenians against the ropes by 413 BC. However, superior naval tactics and generalship allowed the Athenians to wipe out the Spartan fleet three times (at Kynossema in 410 BC, Kyzikos in 409 BC and Arginousai in 406 BC). Thanks to Persian funding, the Spartans were able to rebuild their fleet each time. When they finally managed to destroy the Athenian fleet (at Aigospotamoi in 405 BC), the Athenians had no money left to rebuild it, and their fate was sealed.
The decision to send Cyrus to fund the Spartan fleet unfortunately backfired pretty horribly. Instead of tying Spartan loyalties to Persia, Cyrus appears to have tied them to himself; with Athens defeated in 404 BC, with Sparta raised to unprecedented heights of power, and with the entire Aegean dominated by Sparta, Cyrus assured himself of their reciprocating support, and promptly marched on Susa to seize the Persian throne. He was defeated, but the Persians were still forced to fight a war in Asia Minor against the Spartan empire they had helped create - which was exactly the situation their policy had been intended to prevent. Reversing their stance, they now decided to back the Athenians against Sparta. Spartan naval power was broken by an Athenian-led but Persian-funded fleet at Knidos in 394 BC.