The sorts of arguments you refer to have come to be known as evolutionary debunking arguments.
One such argument would go something like this:
- Our moral beliefs can be fully explained by our evolutionary history.
- If so, then moral facts play no role in our moral beliefs.
- Therefore, we should be skeptical about the existence of moral facts, or our ability to know them.
The actual arguments are more subtle than this, but I'm using it just to make the issue clearer. How can we respond to such arguments? A comparison with mathematics may be useful. Substitute 'moral' with 'mathematical', and we get:
- Our mathematical beliefs can be fully explained by our evolutionary history.
- If so, then mathematical facts play no role in our mathematical beliefs.
- Therefore, we should be skeptical about the existence of mathematical facts, or our ability to know them.
And we would not want to say that, since skepticism about mathematics is much less plausible than skepticism about morality. So, is this a good objection?
First, it highlights the fact that evolutionary explanations by themselves do not suffice for skepticism (unless you go for a much more global skepticism, which is another issue), which is an important point. Second, it probably does not refute the moral argument. The moral skeptic can reply as follows: there is (at least) one important difference between the case of mathematics and that of morality: in morality we rely heavily on moral intuitions, which are shaped by evolution, whereas in mathematics intuitions play a far less significant role.
(On a related note, there have been attempts to argue for moral realism by imitating indispensability arguments for mathematical realism. E.g. here.)
There are other arguments that try and argue that moral facts somehow do play a role in our beliefs, and so we should remain confident about them. The issue is complex. I suggest that you read the SEP entry on this.