"And hereby we know that we are of the truth, and shall assure our hearts before him." (1 John 3:19)
There is a chain of reasoning in this context that is important to understand. Our hearts will be "assured" before God (3:19) if we love the brethren in "deed and in truth" (3:18). A lack of that heart assurance condemns us (3:20). If our heart does not condemn us, then we will have "confidence toward God" (3:21).
It is worth noting that John uses the word "love" 26 times in this little letter. The word "know" is used 31 times, but the word "assure" is used only once (our text) and the word for "confidence" just four times. In each case, the promises of boldness in prayer or trust in answered prayer--these promises are based on our obedience.
Apparently, the key to an effective relationship with God, especially the key to a confidence in our prayer life, is a ready, visible, and instant response to God's requirements for the believer. To the degree that we abide in Him (2:28), we will be confident when He returns. Our ready love for the brethren will keep us bold before God in our prayers (3:21), and our Christlike lifestyle will give us boldness at the judgment (4:17).
Meanwhile, absolute and steady belief in God's salvation will remove any doubt that God hears us when we pray (5:14).
There is a continuing loop in these messages. We gain confidence as we "do" truth. We find more boldness as we understand God's answers to our needs and prayers for others. That, in turn, increases our confidence that God is listening to our prayers, making our hearts all the more confident in our relationship with our Heavenly Father. HMM III