The first condition for prayers to be effective is to acknowledge the existence of God. A person in doubt or having an ambivalent attitude towards God is like trying to catch the image of the moon in a lake. A pessimist like Schopenheur had declared that the God is dead, a rationalist like Buddha did not believe in the existence of God but a Western philosopher opined that we may have to invent God even if he does not exist to maintain sanity and balance in the troubled world.
I believe that a person has eyes but is virtually blind or intellectually retarded who does not accept the existence of God or a supreme power. An atheists is a prisoner of his ego who can not see beyond himself. One has only to step out of his home to see the manifestation of God in plants, trees, animals and mankind. The life cycle of animate beings is regulated by a blue print which is unique to all beings according to their pattern of genes but bound by a common law of life and death. If all beings are governed by a common law, it stands to logic that there has to be a law Maker. The Universe is also governed by a common law of gravity and magnetic force. The earth rotates around the sun at the speed of 67000 miles per hour and around its axis at the speed of 1674 kms per hour, but surprisingly, we are absolutely unaware of its movement , no jerks, no toppling effect and no noise. Nature functions silently and with an astounding regularity unlike humans who make much ado about nothing. If the sun decides to play truant, the eco system and sentient life will collapse. No wonder the Vedas are full of hymns and veneration for the sun god.
Prayer is a silent communication with the divine. It is like bathing in the inexplicable bliss of divine benediction during the moment of prayers . It is fortifying oneself against the evil of the negative tendencies that humans are prone to. It is partaking of the grace that is showered upon us during prayers provided the prayers are offered in the spirit of surrender to the divine. ” Prayer is a luminous , self generating energy when we address ourselves to the infinite source of all energy; we embrace the inexhaustible power which sustains the universe. It cleanses the system of mental poisons and helps us receive His / Her grace “. The ideal time for prayers is dusk or twilight hours and not 24 hours . The gods also need their hour of rest and recreation ! Besides, they have other better things to do rather than to delve into and solve the petty problems of humans which are of their own making. If one’s wishes are fulfilled , it can be a case of coincidence or a fortunate combination of past or present karmas, which we call luck. This luck even works to ward off physical calamities like accidents or natural calamities like earthquake entirely due to karmic effect.

It may, however, be added here that prayers offered to seek some favour or material benefits are considered impure or vitiated. There is no barter system in the divine scheme of things. Gods do not normally interfere with the Karmic law(Also read, signs of a karmic relationship). Even Lord Rama and Lord Krishna had to undergo infinite troubles during the course of their life. Gita says in Verse VI-5 that , ” One should lift oneself by one’s own efforts and should not degrade oneself ; for one’s own self is one’s friend and one’s own self is one’s enemy “.
The main emphasis of the Gita is on Karmayoga- of doing one’s righteous duties. Lord Krishna prevailed upon Arjuna, after interminable dialogues, to do his duty as becomes a kshtriya warrior. He weaned away Arjuna from emotional entanglements he had sunk into forgetting that the enemies he was arrayed against had sided with an unjust and deceitful ruler, Duryodhana.( Incidentally , it is inconceivable that Gita consisting of 18 chapters was delivered in the battle field of Kurukshetra when the two vast armies were facing each other. It seems to me that Maharishi Vedvyas used the pretext of the war to create a background and verisimilitude to propound on his wonderful treaties on subjects concerning spiritual and practical dimensions of life in the words of Lord Krishna. Well my hypothesis is subject to open debate and discussions by wise and learned readers ! ).