The Battle of Marathon was fought because the Persian Army wanted to defeat the Greek city-states that supported the uprisings in Ionia. Athens sent ships to help Ionia, but war struck because of this.
The Persians, led by Darius who wanted revenge sailed down to the coast of Greece to end up at Marathon. The Athenians were greatly outnumbered, so they came up with the strategy to weaken their central line and put more soldiers towards either end. The phalanxes had to run at the Persian army so that they weren't killed by the bows and arrows. The Persians had to retreat. Since the Athenian women were told to kill themselves if the Greeks lost, Pheidippides ran 42 km to tell them that the Greeks won.
This battle was important because even though the Greeks were highly outnumbered, they still used war tactics to pull off a victory. Not only did they win a war that could have resulted in many deaths of women, children, etc., but they also protected themselves from being conquered into the Persian Empire. This war was the first of many between the Greeks and the Persians.