Well, if you want my own way of thinking, from my own experience: Practice and experience aside, once you think you've gotten a good feel, I'd suggest to try and feel the end results, and look for the "least worst result".
So, let's say you're given a situation, and you can make one of two choices - you can either predict a switch, or stay in to deal damage, or set up utility of sorts.
Now think about what would happen if you guess wrong on both situations - your switched-in pokemon could faint, your current pokemon on the field could faint, or both could take heavy damage, or your opponent subbed in a pokemon that would put themselves in a better position. Prepare yourself on what you can do next from those situations.
Point is, you should be thinking two-three steps ahead too; if your predicting, there's always a chance where you would of guessed wrong, resulting in putting yourself in a bad spot; but, try and not put yourself in a ultimate-worse-case scenario in that regard. Basically, always have a Plan B.