In the Garden of Eden when God asked, "Adam where are you?" it does not mean that God did not know where Adam was. After all, God knows all things (1 John 3:20). Adam was hiding because of his sin and rebellion, and God was asking where he was in relation to Him. Adam had been given the responsibility to tend the Garden. He was also given a wife whom he was to guide and protect. God had told him not to eat of the tree of the knowledge of good and evil, but to trust in God. So, when Adam sinned, he was not taking care of his responsibility in the Garden properly. He was not guiding or protecting his wife, and he was not trusting in God. So, he had rebelled against God, and his sin caused a separation between him and God (Isaiah 59:2). That is why Adam hid himself - because of his sin. And in response to Adams situation, God asked Adam where he was, but not because he wanted to know Adam's physical location. He was calling out to Adam, pointing out to him that he was hiding from him, that his sin jeopardized his calling and responsibility given to him by God. It is a question that is important to us all because we need to know where we are in relationship to God.
There is the doctrine called Federal Headship, which means that the male represents the descendants. Even though Eve sinned first and gave the fruit to Adam, sin entered the world through him, not her (Romans 5:12). Adam was the one in authority, and therefore the one with the responsibility. When he rebelled against God, he brought sin into the world, affected creation, and affected his relationship with God. All of this is tied up in the question "Adam where are you?" It is a declaration in question form of the horrible situation in which Adam had found himself.