In order to know the opponent ranges better, you need to know your ranges from every position, open, call, 3bet, c3b. Also, you should know what type of player your ranges represent, TAG, LAG, and others. Knowing that you should know your percentages from every position if you're using HUD, and relate that with the ranges you're using, then you adjust your ranges and percentages to opponents and this is how you start...
A good way to practice that is with the hand replayer, but you should remember that there is always a possibility that you'll miss the exact range you're putting someone on, so it takes practice...