John taught that if we do what God told us to do, we are going to have confidence before God and receive answers to prayer. So obedience to God is a major key to developing strong faith.
On the contrary, disobedience to God will surely weaken our confidence and hinder our ability to receive answers to prayer from God.