When YHWH was preparing Joshua to lead Israel into conquest of the promised land, he said this to him:
"Only be strong and very courageous, being careful to do according to all the law that Moses my servant commanded you. Do not turn from it to the right hand or to the left, that you may have good success wherever you go. This Book of the Law shall not depart from your mouth, but you shall meditate on it day and night, so that you may be careful to do according to all that is written in it. For then you will make your way prosperous, and then you will have good success. Have I not commanded you? Be strong and courageous. Do not be frightened, and do not be dismayed, for the LORD your God is with you wherever you go." - Joshua 1:7-9God commands Joshua, and through him all Israel, to be strong and courageous, to not be frightened or dismayed by their enemies or the gods of their enemies, to do all the law that God gave to them through Moses, and not to turn from it to the right hand or left. God promises he will be with the people wherever they go and that they will have good success in their battles against the idolatrous inhabitants of the land and in taking possession of the land.
Joshua and the people are told to not let the law of God depart from them or them depart from the law of God. How do they keep themselves from departing from God's law? By meditating upon it day and night. They are to meditate upon the law of God always so that it sticks in their hearts and minds, so that they know it through and through, so that God's law is thoroughly implanted in them.
David says in Psalm 1 that a man who delights in the law or the LORD and meditates on it day and night "is like a tree planted by streams of water that yields its fruit in its season, and its leaf does not wither. In all that he does, he prospers" (see Psalm 1:1-3).
Psalm 119:9-16 is a wonderful description of the method and benefits of meditation according to God's Word:
"How can a young man keep his way pure? By guarding it according to your word. With my whole heart I seek you; let me not wander from your commandments! I have stored up your word in my heart, that I might not sin against you. Blessed are you, O LORD; teach me your statutes! With my lips I declare all the rules of your mouth. In the way of your testimonies I delight as much as in all riches. I will meditate on your precepts and fix my eyes on your ways. I will delight in your statutes; I will not forget your word."So rather than the common notion of meditation, to focus on emptying one's mind, Scripture teaches that Godly meditation, Christian meditation, is to fill one's mind. And the thing we are to fill our minds with is the law of God, the Word of God, the holy scriptures. We do this so that we will not fall into sin, so that we will not depart from God's will and God's way for us, so that we will be careful to do all God would have us do. When temptations and messages come at us from our own sinful hearts or from an unbelieving world around us, if God's word is hidden in our hearts, we will have God's own words stored away in our inner hard-drive, a bit like an anti-virus software. God's word hidden away in our hearts will help us filter out lies and temptations and it will point us to God's truth.
Paul tells the church to "let the word of Christ dwell in you richly, teaching and admonishing one another in all wisdom, singing psalms and hymns and spiritual songs, with thankfulness in your hearts to God" (Colossians 3:16).
Far from the pagan practice of meditation, which is to empty one's mind of all things, Christians are called to a different type of meditation, one which fills the mind and heart with God's Word. Instead of a meditation that erases the hard-drive of our mind, we are taught to download and store God's word in our hard-drives, to completely fill our mental and spiritual hard-drives with God's Word. And we are to do this so that we might not sin against him.
Justin Taylor quotes Joel Beeke at length on the Puritan practice of Meditation on the Scirptures. It is well worth checking out these 22 benefits of Scriptural meditation. It is also worth reading Beeke's whole essay, linked at the bottom of Justin Taylor's post.