Technically, prayer is not "talking with God." It is not the same as a typical conversation we would have with a person face-to-face or with someone on the telephone. It is the process by which we make our requests known to our heavenly Father.
Prayer is also the means by which we can privately worship and revere our Father. His response to our requests and petitions can take many forms, and can occur at any time after our requests are made, but it is almost never in the form of an audible voice.
Prayer is the means by which we acknowledge and strengthen our relationship with the Eternal and seek out His will for our lives. It is the avenue by which we can honestly confess our sins, ask forgiveness in Jesus' name and cry out to God for help in overcoming them and the trials of life.
Prayer also is the way we can petition our Creator for the benefit and blessing of others, even those who use and persecute us (Matthew 5:44).
Jesus himself placed great emphasis on prayer during his ministry. He prayed all night regarding whom should be his inner circle of twelve disciples (Luke 6:12 - 13) and talked to God fervently just before his arrest and death (Matthew 26:36 - 44, Mark 14:32 - 40, etc.).
Christ asked the Father, through prayer, to strengthen the faith of Peter so that he would not fall into the devil's hands (Luke 22:31- 32) and besought him to give the Holy Spirit to all who repent and obey (John 14:15 - 16).
True communion with the Eternal is not a religious ritual meant to appease an all-powerful Deity. It is not the means by which we can bargain with or extort from our Creator (as if it were possible) to give us what we want (or demand!). It is also not a sign, of itself, that we are closer to God than others (Matthew 6:5).
Prayer should take place when it is sincere and needed. It is not the quantity, but the quality, of our communication that matters the utmost.
Jesus warns us that mindlessly repeating memorized phrases toward God (as the Roman Catholics do through a rosary, which is a string of beads used to help count such petitions) is a waste of time. The repetition of words does not increase our chances that what we say will be heard by Him or that our requests will be granted (Matthew 6:7).
The Bible does not specify how long a prayer "should" be or recommends a particular time of the day when such communications will be the most effective. In fact, the Apostle Paul teaches we should be in a state of mind to make our requests known to our Father at any time (1Thessalonians 5:17)!
When we do focus our hearts toward our Maker it should be in the name of Jesus Christ (Philippians 4:6, John 16:22 - 24).
Effective prayer is comprised of many elements. It should be offered from a pure heart (Psalm 66:18 - 19) that forgives all enemies (Matthew 6:14) and has faith in God (James 1:6 - 7, Hebrews 11:6). It should be simple (Matthew 6:5 - 6) and given in an attitude of humility and repentance (Luke 18:10 - 14).
At times prayer should be bold (Hebrews 4:16), and even persistent (Matthew 15:22 - 28, Luke 11:5 - 13, 18:1 - 7) but always sincere (Hebrews 10:22).