This is a great question. I would say that Homer (epic) was the bible for the Greeks. It was their glorious past. It provided moral exempla for them to follow in life and war. It also gave them a sense of cohesion as well. So, it was absolutely important to their development. This would be the case not only for the city states of the 5th and 4th centuries, but also for the hellenistic period. For example, tons of fragments of Homer are still being found in the sands of Egypt. Most likely, these fragments were the school exercises of children.
This is a really interesting question. Just to be sure before I continue, let me define epic poetry in very general terms: epic poems are usually long, feature heroes acting against the background of national or international events, and frequently grow out of oral traditions (or, more specifically, histories and mythologies passed down by word-of-mouth, not in writing).
Like most epic poetry, Greek epic poetry was used to record and transmit information about that people's core values, such as hospitality (in the case of the cause of the Trojan War in the Iliad), loyalty and perserverance (in the case of the Odyssey), and trickery used the right way to achieve the right goals (in both epics).
You can see in the structure of the Greek epics -- especially the repetitions and links between sections in the Iliad and the episodic nature of the Odyssey -- that these works were probably publically recited in part or in whole to both entertain and educate the audience.
The link given below discusses the difference between the "primary epic" (from oral cultures, only written down later) and the "secondary epic" (from writing cultures, written down from the start) and makes other, very good points, including the statement "The primary epics were developed in cultures that have not yet attained a national identity or unity. Greek city-states, etc. Examples of the primary epic include: the Iliad, the Odyssey, Beowulf, Gilgamesh."