The context of this passage has to do with the Covenant between God and His people, Israel. It is a reminder of their commitment to keep and do God's commands which are designed to govern their lives.
The source of obedience is the heart (vs 16). They are reminded that they had made a sincere determination that the Lord was to be their God, to walk in His ways, and to keep His statutes, commandments, judgments and to hearken (hear and obey) His voice (vs 17). God also promised that they would be His peculiar (the Lord's own special treasure) and that, as a nation, they would be "high above all nations", meaning that she would be exalted and blessed. Prov 14:34 declares that "Righteousness exalts a nation,But sin is a reproach to any people." NKJV
There is a direct association to both a personal and a national adherence to the Word of God. Consider the direction your life takes when you stray from obedience to God's Word. Do things get better, or worse? Consider also what takes place in the life of a nation which willfully turns from the guidance of God's Word. Even worse, when a nation willfully rejects and seeks to remove God's Word from national life by removing the 10 Commandments from public view, etc.
Once again, it is a matter of the heart. How's your heart?
Robert Robinson wrote the words, adapted by Margaret Clarkson, to 'Come Thou Fount of Every Blessing'. Twice in this hymn, reference is made to the heart. Take a moment to sing this great hymn, making melody in your heart to the Lord.