It's pretty common for people walking dogs to let the dogs approach each other, sniff, greet, maybe play and interact. But it this always the best choice?
Be careful if you decide to let your dog meet/greet an unknown dog being walked by an unknown person. All dogs can be unpredictable, especially ones you've never met before. If your dog has a negative experience -- maybe the other dog growls or attacks -- this could have long-term effects on your dog, especially if it happens regularly.
Or maybe your dog doesn't have a negative experience -- maybe it has a great time! Although the dog's had fun, this experience can also affect its behavior on future walks. Now it sees other dogs as an opportunity for playtime, and can develop the expectation that it gets to go and say hi. Maybe now your dog is pulling on the leash and ignoring you in the presence of other dogs. And if you don't let it go say hi, frustration behaviors such as barking and leash-biting may be close behind.
The ideal situation for many dogs may be a hard-and-fast, easy to understand rule -- while your dog is on leash, he's to focus on you and not greet/interact with other dogs, and while he's off-leash he's free to meet, mingle and play.
Another option would be for you to tell the dog upfront (immediately, upon sight of the other dog) whether he's going to be allowed to greet the dog onleash. By giving your dog early information -- and being absolutely 100% consistent, you can often prevent a lot of frustration. Pick a consistent word or phrase that you can use every time your dog orients to the other dog -- "Go say hi" and "Not today," for example. Make your decision quickly -- there should be no grey area for your dog to be wondering if he's going to get to greet or not.
If you are going to let your dog meet dogs sometimes, which dogs? A quick read of the other dog's body language will give you some helpful information. Not all dogs want to meet your dog! If the other dog is cowering behind the owner, has a stiff body or tail, or is giving your dog a hard stare, that's not a good dog to meet. If the other is overpowering its owner or dragging or lunging enthusiastically to meet, that's not a good choice either. A good dog to meet would be calm and relaxed, standing, wagging its tail, on a loose leash and making soft eye contact. Make sure to ask the owner first if the dogs can say hi; move on quickly if the answer is "No." (Also move on if the answer is hemming and hawing, or reluctance, or a long explanation of how to do it, etc.) Keep the greeting short -- about three seconds is all that's needed. (Longer greetings tend to escalate most dogs.) Then "Let's go" and move on. It's a good practice to reward your dog for compliance in moving away from the other dog, after you've moved away. Don't use food in the immediate presence of the other dog though; this could be a safety risk if one of the dogs guards food.
If your dog wants to greet other dogs on leashed walks, whether or not he gets to do that should be your choice -- not your dog's choice. Before you choose to allow it, think carefully about whether it's a good decision and if it's a helpful one, and then make sure the greeting is done in a calm way, and then move on. If your dog does not want to meet the other dog, then you should respect its choice on that, and move on without forcing interaction.