The Bible gives an example of silent prayer in Hannah’s inaudible petition (1 Samuel 1:10, 13), but it does not give specific instructions on praying silently. That does not mean that silent prayer is any less valid than praying out loud—Hannah’s prayer was answered, after all. God can hear our thoughts just as easily as He can hear our words (Psalm 139:23; Jeremiah 12:3). Jesus knew the evil thoughts of the Pharisees (Matthew 12:24-26; Luke 11:17). Nothing we do, say, or think is hidden from God, who does not need to hear our words to know our thoughts. He has access to all prayers directed to Him, whether or not they are spoken.
The Bible mentions praying in private (Matthew 6:6). What is the difference between praying aloud or silently if you are by yourself? There are some circumstances where only silent prayer is appropriate, e.g., praying for something that needs to stay between you and God only, praying for someone who is present, etc. There is not anything wrong with praying silently, as long as you are not doing it because you are embarrassed to be heard praying.
Perhaps the best verse to indicate the validity of unspoken prayers is 1 Thessalonians 5:17: “Pray without ceasing.” To pray unceasingly obviously cannot mean we are praying out loud all of the time. Rather, it means we are to be in a constant state of God-consciousness, where we take every thought captive to Him (2 Corinthians 10:5) and bring every situation, plan, fear, or concern before His throne. Unceasing prayer will include prayers that are spoken, whispered, shouted, sung, and silent as we direct our thoughts of praise, petition, supplication, and thanksgiving to God.