You could not perform MD with residues missing, especially in the middle of the sequence. For docking only, it is importante to have all binding site residues.
Firstly are we talking about missing residues or the occasional missing side-chain? For MD, the answer is "yes" no matter which.
For docking, it is not so straight forward. If the missing residues/sidechains are not in the active site then they only need be included if you are using an electrostatic component in the scoring function which may rely on a charge supplied by the missing residue to get to close to the right answer. GOLD, as an example does not use such an electrostatic component and so such residues can be safely ignored.
If there are missing residues in the active site, and that includes missing backbone atoms you will need to make some attempt to model those residues appropriately . If however you have all the backbone atoms but one or two side-chains are missing in the active site then it is not so clear cut. You have to decide which conformation to put the sidechains, if you add them, and that is not easy to decide. If your docking program can handle some limited side-chain conformational freedom then all is well, you just set these sidechains to be flexible. If not however you might be better setting all missing residues to Alanine. It sounds like a heresy but may give you the best result. What you are doing is assuming the side-chain is so flexible (because you can't see it in the X-ray model) that it can move out of the way to accommodate the ligand.
The tertiary structure of protein is irregular and random and it is fashioned in such manner by many stabilizing forces due to the bonding interactions (hydrophobic and hydrophilic, covalent, salt bridge, ionic etc.) in between the side chain groups of amino acids. These interactions are held responsible for the stability of protein. So now imagine if any of the residue is missing from its position, what will happen to your protein stability.
So, adding missing residue is essential in Molecular Dynamic Simulations as we are studying the change in structure with respect to time and by change in structure we mean change in interactions too.
But in case of Molecular Docking, story becomes bit different as in docking, we study the interaction in between the ligand and active site of protein, if your missing residue is present in active site then you must need to add it but if the residue is missing from terminal position then it will not affect the results as in docking the protein is treated as rigid excluding the active site.
You can add missing residues by using spdbv (Swiss-PdbViewer). What you need is just to open your PDB file in spdbv and it will automatically add missing residues and save the file as current layer.
You can also use Discovery studio by following the clean protein wizard
It is mandatory for MD simulations to add missing residues while as in the case of docking it is optional. By optional, I mean, if the missing residues belong to the active site then you need to incorporate otherwise not. In fact, you have been provided with good explanations by Anu, Jhon Lebeschuetz etc.