It depends on how much dice rolling you're willing to do.
One option is to simply give every monster or PC a "line-of-sight" percentile chance; any time someone attempts to spot, shoot at, or otherwise acquire line-of-sight in a fight, you just roll the percentile to decide if they can catch sight of them in the confusion of battle. Depending on how the battle works out, you might assign higher values for some characters or monsters than in others--if it's a revolutionary war campaign, for example, and everyone's marching in nice straight lines, everyone should have like a 95% chance of line-of-sight. If it's a fantasy game and the party is getting ambushed by goblins in the woods, well, then line of sight might be more like 20% for the goblin archers, 35% for the goblins charging the PCs, and 50% for the PCs themselves.
The problem with this is that it A) requires a lot more dice rolling and B) can be fairly arbitrary. I personally like keeping the amount of dice bouncing to a minimum, so I have another method that I use.
For every encounter I put together, I just assign each monster a few "miss points" that I can spend as the course of battle requires. For each time I need a monster to lose line-of-sight for a particular character (and the reverse, if you're so inclined!), I just mark off one more miss points until finally it's entirely out of miss points and the PC has finally figured out where it is. The key to this system isn't to use them at your discretion, not the PC's. It's also important not to give it a mechanical representation--or tell the players what you're doing.
The whole point of this alternate method is to keep the GM's bookkeeping headaches to a minimum. That doesn't work so well if you start attaching mechanical rules to it. Defined rules open the possibility of metagame exploitation (where one player might say "I try to spot the goblin" as a free action every freaking round). At some level, the GM needs to just exercise good judgment to keep the story progressing.
An even less complex method, by the way, is to simply make a decision on the spot. That works if you are pretty good at remembering that the purpose of an encounter is to challenge the players, not kill their characters off.