Hmm... Imo, it really all comes down to experience. When you see something done against you first time, your reaction time is a lot slower cause of the suprise factor, you haven't experienced this type of stuff before. The more you practice, the more you learn how to react to different kind of things and after some time they come naturaly of you cause they're on your subconciusness, you don't really think of what you're currently doing or how you do it, but more like why are you doing it. If Sheik fairs your shield, you know what his options from there on are right? It's a guesswork at predicting what they will actually do, but when you have experience, you will remember what you can do in certain situations and if you've payed attention to what they've done previously to your shield, you can make a hazard guess at what he's gonna do. If he's gonna stay there and try to deteoriate your shield with spaced dtilts, ftilts and jabs, you can try to sidestep an ftilt to slap of your own or dsmash, roll away or try to shieldgrab after the ftilt.
Most smashers play on instinct and the decisions are made in milliseconds, but mostly they work on from what they've experienced in the past. You get better at reacting to things as your experience rises, believe me that I was once extrememly slow and even nowdays I end up standing in place or teching in place and end up daired by C.Falcon cause I couldn't react fast enough. But I do know my options from thereon and what is usually the most effective one to counter a dair from Falcon. In every situation you must quickly think of your possible options and do what feels best for you, and if you can't then you can always roll away to reasseble the situation. In a situation where it's obvious how you can counterattack, for example Marth's fsmash hits your shield, should come out naturally when you practice it. In situation where C.falcon player uses Nair and goes trough your shield where he has tons of options at where to go, it gets trickier to make the right decisions and predict at what they opponent is doing and this is where observation comes into play. If he previously jumped trough your shield and dashed away, there is a good possibility that he will do so again to avoid your jumping out of shield. But even more trickier part is to expect the unexpected, prepare yourself to the situation where they will mix up their game, like that same C.Falcon, instead of dashing away will shield this time, expecting you to jump out of shield to aerial him. If you can even hazardly predict that he will change his tactic, you can change your tactic too and mix up. This time, instead of jumping out with an aerial, you either roll away from him, shield and see what he does, wd out of shield ect. You also have a lot options of what you can do and mixing them up makes you unpredictable.
My friend for example, after seeing he did go for the shieldgrab all the time due to him not really doing nothing else from the shield (though he did use his shieldgrabs in a way that he grabbed my hand or something, to extend his range an all, which was annoying), I was prepared and started using dsmashes from float cancelled aerials more, spaced my fairs and nairs out of his range, didn't go for the doubleslap that much anymore but occasionally, but instead ran away and dash danced back into a dash attack, effectively countering his shieldgrabbing tactic. He also liked to hit me with the wakeup tactic 90% of the time, occasionally rolling away, so I feinted with a dash dance that I was in his range, making him do the wakeup attack and then went to the punishment. Observe the simple little things your opponent does like where he techs, how does he do the wakeup tactic, does he jump and double jump often, how does he recover, where does he recover and what does he like to do on the ledge. If you can punish one of these actions, chances are he will now change his tactic. Commonly inexperienced players do not change tactics and sometimes when the experienced player expects them to do something else than the old stuff, they still continue to do the old stuff and the good players are caught by suprise.
Adaptation is also a big part of melee, you adap to certain situations as you play the game, you start expecting things what your opponent is doing and then you can go for the punishment when you've predicted correcly. Pro players mix up all the time to make themselves a lot less readable, unlike most players that can be obvious at times. Everyone work on instinct to some point, but the good players subdue these instincts like automatic shieldgrabbing or sidestepping, and work their way trough their habits. Everyone has their own style and what they like to do, no player is the same, so observe and learn (lol that rhymed).
Yea, it's long and boring and possibly wrong in many aspects too, I don't know, but it's really difficult to try and explain that stuff. <_> Speaking with good smashers usually helps a lot, you'll learn a lot from different smashers. :3
Edit:
http://www.youtube.com/watch?v=aQPSAL8MPUE 2:17-2:18
See how that Falco stopped for a second, then predicted your roll? It's a sing that he had predicted you, he followed you as you moved away. First time he was sidestepping after he daired your shield, was plain guesswork and it worked. Next time he did the same thing, dunno if predicted and it worked again. Now he knows you have a tendency to shieldgrab and will work something out of that. He also employed tactics he usually does, like dair out of shield as an punishment when hitting his shield which works most of the time. If he noticed it's not working he can change tactics and adapt or mix up, like he used shine from shield once instead of dair. People have their style, their tactics and their strategies which they have when versing against someone you don't know. After a brief moment they are now employing different things they do, not always approaching the same way etc. If peach were to always throw a turnip at you and then fc fair, then doubleslap, wouldn't you learn to expect that after it's been done couple of times? Adaptation is the key and it's on human nature to adapt, so learn to use it and use it well. :3 I'll do some character matchup thingies briefly to my above post.