When we pray in accordance with the will of God–the plan for good and not for evil–then He hears. It's a promise!
"And this is the confidence that we have before Him: If we ask anything according to His will, He hears us. And if we know that He hears us in whatever we ask, we know that we already possess what we have asked of Him." (14-15)