Surely, one of the hardest things for us to understand about God is that He is timeless and infinite, and He doesn't look on time the same way we do.
What do I mean by this? When you and I think of time, we think of hours, and days, and years -- but God isn't limited by those measures. We also think of things as having a beginning and end -- but God isn't limited in this way. In other words, we are finite and limited -- but God is infinite and unlimited. Before time ever existed, God always was. The Apostle Peter put it this way: "Do not forget this one thing, dear friends: With the Lord a day is like a thousand years, and a thousand years are like a day" (2 Peter 3:8).
This may seem difficult to understand (and it is), but don't overlook the basic truth behind it: God has always existed and always will. And even before He created the world, He was already planning for our salvation through His Son, the Lord Jesus Christ. The Bible says that God "chose us in him (Christ) before the creation of the world" (Ephesians 1:4). Christ's death and resurrection were not accidents; God planned them from all eternity. God loves you that much!
Pray for your atheist friend. His question may not have been sincere; he simply may have wanted to put you on the spot. But God still loves him, and some day -- through your prayers -- he may realize how empty his life is without God, and will discover the joy of knowing Christ.