The idea
If the answer to a problem is a value in some range [lo, hi], and there is a monotonic feasibility function — meaning "if X is feasible, then X+1 is also feasible" or vice versa — you can binary search on that answer. Instead of searching for a value in an array, you search for the minimum (or maximum) value that satisfies the condition.
The template
lo = minimum possible answer, hi = maximum possible answer. While lo < hi: mid = lo + (hi - lo) / 2. If feasible(mid): hi = mid (looking for the leftmost feasible). Else: lo = mid + 1. Return lo. The feasibility function is where 90% of the problem-specific logic lives.
Classic examples
Koko Eating Bananas: binary search on eating speed; feasibility = can Koko finish all piles within h hours? Minimum Days to Make m Bouquets: binary search on days; feasibility = can we pick m bouquets? Capacity to Ship Packages in D Days: binary search on ship weight; feasibility = can all packages be shipped in D days with this capacity?
Recognition signal
The phrase "minimum X such that condition holds" or "maximum X such that condition holds" is the strongest signal. Also look for: large numeric ranges in constraints (suggesting O(n log n) is expected), and a feasibility check that runs in O(n).