The letter says believers can have confidence before God, and that if they ask anything according to his will, he hears them. It adds that knowing he hears implies they have what they asked. See 1 John 5:14–15.
In 1 John 5:13 the writer states why he has been writing: to help people who already believe in the Son of God’s name be sure they have eternal life and to keep trusting that name. He then draws out what this confidence looks like in prayer: believers can approach God boldly, knowing that requests shaped by God’s will are heard. These verses sit near the close of 1 John, where the writer gathers themes he has been repeating—belief in the Son, assurance, and the practical outworking of that assurance.
These verses close out 1 John’s main aims: the writer addresses people who already believe “in the name of the Son of God,” and he says his writing is meant to produce knowledge—settled certainty—that they have eternal life (verse 13).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with 1 John 5:14-15, then read the surrounding section so the answer stays connected to the passage's flow.
14This is the boldness which we have toward him, that, if we ask anything according to his will, he listens to us.
15And if we know that he listens to us whatever we ask, we know that we have the petitions which we have asked of him.