When is the best time to pray? The short answer is: every time! As Martin Lloyd-Jones is quoted for saying: “Always give in to every impulse to pray”.
Daniel had a great approach to the best time to pray. Daniel would pray according to a set routine, but also used the events of the day as prompts to pray.
When Daniel knew that the document had been signed, he went to his house where he had windows in his upper chamber open toward Jerusalem. He got down on his knees three times a day and prayed and gave thanks before his God, as he had done previously.Daniel 6:10 (ESV)
Both the frightening reality of the signed law against true worship, and his routine of daily prayer came together here to produce this example of prayer.
Have those times of prayer where you can pray in isolation from this world. Also, use the events of the day to prompt you to pray.
Pray to say thank you for what you have; pray to ask for what you need. Pray for yourself; pray for others. Pray when you are joyful; pray when you are fearful. Pray when with the saints; pray when alone. Pray to worship God; pray on behalf of those who don’t. Pray in times of blessing; pray in times of trouble. Pray when prompted; pray when planned. Pray for the rich and influential; pray for the poor and oppressed. Pray when you feel like it; pray when you do not feel like it.
pray without ceasing1 Thessalonians 5:17 (ESV)