One of the customs I love in Thailand is removing my shoes before entering a home. The purpose of this custom is based on the fact that most of the dirt brought into a home is stuck on the bottom of shoes. Therefore, in order to keep the dirt out, the simple solution is to keep the dirt on the shoes outside the door thus ensuring we do not walk dirt into a clean house.
In Exodus 3:5 Moses is standing at the Burning bush and he is asked to take off his shoes.
In Joshua 5:13ff there is a similar story where Joshua is near Jericho, he looked up and saw a man standing in front of him with a drawn sword in his hand. The man says to him you are standing on holy ground remove your shoes.
We are called to be holy as God is holy, but so often we choose to keep the dirt in our lives and attempt to enter the throne room of God with our dirt, "sin!"
Psalm 66:18 does not speak of shoes, but does speak about the dirt (sin) in our lives. David writes: "If I had cherished sin in my heart, the Lord would not have listened." In the same way that I dishonour the Thai host by walking into their house with shoes on, I dishonour God when I try and keep sin in my life in God's presence. My attitude is saying: "God, I am more important than you!"
If we truly want to be intimate with God, knowing his council for our lives we need to leave our dirt outside.