Is there any historical proof that shows what attitude the Ancient Greeks, specially the philosophers, had towards their Gods?
'The ancient Greek philosophers' is rather a wide reference class. We don't really know enough about the historical Socrates to be sure about his views on the traditional gods.
In the Republic Plato removes from his educational curriculum all unseemly stories about the gods but my impression is that he does this, not because he believes in the gods but because it is morally harmful in his view for the young to acquire beliefs about the less than moral conduct frequently ascribed to the gods. Misbehaving gods are not good examples to set before impressionable minds. Republic, II. 377b-379a.
In Republic VI. 503e-509c supreme goodness and reality are attributed to the Form of the Good (auto to agathon) which is an impersonal first principle absolutely unrelated to and distinct from the anthropomorphic gods of common belief.
The Timaeus refers to the Demiurgos, whose status needs careful delineation. The whole account of creation in the Timaeus is ‘a likely story’ (29c-d) - a myth, story or probable tale - not presented as fact but only as a figurative account which is all that we humans are capable of giving of such matters : peri touton ton eikota muthon apodechomenous prepei toutou meden eti pera zetein. Whatever account of God that emerges or can be derived from the Timaeus is subject to that proviso.
The main argument of the dialogue starts with the assumption that the kosmos (world, ordered universe) is a scene of ‘becoming’, of motion, of events and happenings. Whatever happens must have a cause, and in context this is taken to be an agent (28a-c). The agent is the Demiourgos, the master artisan or craftsman who created the world in its present form from a blueprint, model or archetype (paradeigma : 28a7) of which our world is a likeness or copy (eikon, image : 28b-c) which can only approximate the original. It is tempting to identify the archetype with the world of Forms in the Republic. It may be so but the summary of the Republic with which the Timaeus begins covers only Republic I - V. The Forms are introduced only in Republic VI, 507a ff.
Why make a world at all ? The answer appears to be that the agent was perfectly good and wanted to use their goodness to make something having the closest likeness to their own goodness – and not hug their goodness to themselves (30a3). The world was in a state of chaotic disorder. The first requirement was to introduce order and regularity : order was better than chaos. Introducing order meant introducing mind, intellect, intelligence (nous). Nous required a soul (psuche) to reside in; and psuche needed to be embodied in order to act on the material world. Hence we have the living organisms (zoa) which we ourselves are (30b-31b).
The Demiourgos does not stop there. Having introduced psuche into matter in the case of ourselves, it introduces psuche into the whole realm of matter, creating the 'World Soul' (Timaeus, 36d-37a). The function of the World Soul is to maintain order and regularity as best it can when the Demiougos departs, job done. That of the World Soul is perhaps a less than luminous notion.
But order and regularity, one might exclaim ! What of the disorder and irregularity? The reply is that matter inherently tends towards chaotic flux. This is why the nous-embodied psychai (souls) of living organisms such as ourselves can only have imprecise and approximate knowledge of the sense-based world rooted in matter. Precise knowledge is possible only in mathematics and metaphysics where nous can operate without engagement with matter.
It is unclear whether the Demiourgos made the world out of pre-existing materials on which order and regularity were then imposed. I am inclined to follow I.M. Crombie : ‘the Craftsman is not responsible for the world but only for its good order’ (I.M. Crombie, An Examination of Plato’s Doctrines, II, London : Routledge, 1963, 209.) I.e., the Demiourgos works on pre-existing matter. This sets ungodlike limits on the Demiourgos’ role in creation. But there is no doubt that the Demiourgos is the creator of the kosmos we inhabit. However the Demiouros is not without qualification the creator of humankind since the Demiourgos only embodies the psuche in pre-existing matter which the D. did not create.
Two points before we leave the Timaeus. The first is that it is easy to misunderstand the passages in which the Demiourgos is said to be constrained by ananke or necessity (e.g., 47e). The point is not that ananke or necessity is some external force to which the Demiourgos must bend but rather that, having introduced order or regularity, the kosmos must act according to the laws of order and regularity that the Demiourgos has imposed. The Demiourgos cannot have it both ways : introduce order and regularity and also operate in the world in ways that override them.
The other point is that the Demiourgos is said to create the familiar gods – Rhea, Zeus, Hera and the rest. But the grounds for this claim are so obviously weak, namely that there are descendants of the gods who can be relied on to know their own ancestry (40d-e), that one suspects satire. However, it is true that as the Timaeus progresses, God makes an unmistakable appearance on stage. God as the ‘God of gods’ (theoi theon : 41a) can destroy the gods at will; they have no independent power. The relation of God to the Demiourgos is unclear, at least to me : as the dialogue proceeds they appear to coalesce. But the main message is that none of this suggests, even if the creation of gods is to be taken seriously, any endorsement of the gods of popular belief.
Even the due invocation of the gods for which Socrates calls before Timaeus launches into his speculations (27b) is effectively neutralised by Timaeus's insistence that we must appeal not only to the gods but to 'ourselves' in our use of reason (27d). Socrates' piety towards the traditional gods is hard to take seriously in view of this.
Yet if Plato did not believe in the traditional Greek gods there is quite definitely a religious element in his thought. In Laws, X, his last dialogue, atheism is to be punished and suppressed (907e ff.) by the Nocturnal Council. And what is atheism ? It is here the view that the world, including souls, is purely physical ( ‘earth and stones’ is the phrase used : 886e). The argument is produced against atheism that motion requires the activity of (non-physical) souls; that it is ‘the best kind of soul that cares of the entire universe and directs it along the best path’ (897c : Plato : The Complete Works, ed. J. Cooper, 1997, Indianapolis : Hackett, 1554); and that the best kind of soul is God, ‘who is supremely wise, and willing and able to superintend the world’ (903a : Cooper, 1559-60). There are gaps and leaps in this argument and I am not convinced that these are due solely to the summary nature of my presentation.
Aristotle does have a doctrine of God. God exists as an intrinsic part of his metaphysics and philosophy of nature. God fulfils the role of 'prime mover', the original source of motion (Physics, VIII). But Aristotle's God is so unlike the popular gods that his God is pure, immaterial form and engages in the sole occupation of thinking (the perfect activity) about Godself (the perfect entity) : Metaphysics, Lambda 7.
Plato : The Complete Works, ed. J. Cooper, 1997, Indianapolis : Hackett.
I.M. Crombie, An Examination of Plato’s Doctrines, II, London : Routledge, 1963.
R.D. Mohr, God and Forms in Plato, Published by Parmenides Publishing, United States, 2006, esp. ch.9. ISBN 10: 1930972016 ISBN 13: 9781930972018
Stephen Menn, 'Aristotle and Plato on God as Nous and as the Good', The Review of Metaphysics, Vol. 45, No. 3 (Mar., 1992), 543-573. (Available free online.)
Harry Austryn Wolfson, 'The Knowability and Describability of God in Plato and Aristotle', Harvard Studies in Classical Philology Vol. 56/57 (1947), 233-249.
Thomas De Koninck, 'Aristotle on God as Thought Thinking Itself', The Review of Metaphysics, Vol. 47, No. 3 (Mar., 1994), 471-515.
The account of Pliny the Younger of the eruption of Vesuvius at Pompeii shows various people's actions under extreme duress, how some people were praying to gods (or otherwise expressing supernaturalist faith) and others simply weren't.
I think that philosophers like Plato may have been less likely to believe in the gods, given the power of their arguments: for example, the Euthyphro dilemma is a powerful argument against the moral argument for gods under polytheism.
I can't speak to other Greek philosophers, but Plato and Socrates shared --at least apparently --an idiosyncratic view of the Greek Gods that was at odds with the religious views of the time. In other words, they did not believe in the popularly accepted myths. The key piece of evidence comes in the Republic, where Plato depicts Socrates as explicitly rejecting all myths that depict the Greek Gods behaving badly, and strongly hints at a commitment to monotheism (in contrast to Greek polytheism).
It is true that one cannot always take Plato at face value. In the context of his other writings, however, it is plain that he would never accept that a higher being (a god) could have a lower moral standard. He also generally sees higher things as being more unified and less differentiated, which argues for his monotheism (and is part of the reason Plato was embraced by the monotheistic religions of Christianity and Islam).
It is also true that we cannot ever be sure Plato's Socrates represents the views of the real Socrates. But we do know that impiety --teaching beliefs counter to the accepted religious beliefs-- is one of the major charges that led to Socrates' execution, so his religious unorthodoxy is well-established.
Ortega y Gasset on his book about the philosophy on Ancient Greece suggested that Paremenides could not have been a believer in the Greek gods, despite the fact he quite clearly mentions them in the beginning of his famous poem and with a great deal of respect.
It's probably important not confuse philosophical musings by philosophers on the nature of the divinity or divinities with that of the civic culture. Take for example Spinoza, I've heard him described as an athiest or rationalist yet when I looked at what he wrote he was quite clearly neither of these things in the way this would be understood today. It merely meant that he had reasoned upon the divine and that he did not simply accept the conventional theistic stories of God in his time.
Given the depth of secularism in contemporary European culture it's quite possible that we read back our rationalism into ancient societies, not believing that anybody could not be as ourselves.
There are many different Greek philosophers, and they all had different ideas and attitudes towards the gods.
Plato is addressed well in the other answers: He often spoke of "God" and believed in spirits, but not necessarily in the myths about the gods. But we do know that Socrates had great respect for Apollo's oracle at Delphi, and took seriously the oracle's proclamation that he was the wisest man (Apology 20e). The story about Epimenides erecting a temple for Zeus (Diogenes Laertius 1.115) seems to show he also revered Zeus. (Most people in general worshiped one god in particular, depending on the city. Euripides' Bacchae, for instance, describes the tensions between the traditional worship of Thebes and the foreign worshipers of Dionysus.)
Other philosophers had different theories. Thales believed the world was full of divinities (DL 1.27). Anaxogoras famously described the world as having been created by Mind (νοῦς noûs). Theodorus "the Atheist" seems to have disbelieved in a god altogether. Zeno the Stoic philosopher equated God with the world (DL 7.148). Epicurus believed in gods, but "not such as the multitude believe" (DL 10.123).
Many of the early pre-Socratic philosophers were more interested in physics or astronomy, while some of the later schools (such as the Cynics) only studied ethics and technically had no theories about the gods. Most philosophers refer to "God" or "the gods" respectfully but without much explanation of how they viewed them.
I daresay most Greek and Roman philosophers and poets took the myths with a grain of salt, that is, they did not necessarily take them literally. "Even Homer sometimes nods," they said.