Why people ask it
Often because they have been told, directly or by implication, that atheists cannot be moral — and they know that is false.
Short answer
People can absolutely know and do good without believing in God. The disagreement is about what grounds moral obligation, not about who behaves well.
Deeper answer
Two questions get merged constantly. Moral epistemology asks how we know what is right; moral ontology asks what makes anything right. Atheists clearly succeed at the first, and Christian theology has always described the moral sense as universal rather than as a benefit of membership.
The second question is where the disagreement lives. Naturalistic accounts — evolutionary, contractual, well-being-based — each explain something real about how moral norms function. The persistent difficulty is the jump from description to obligation. Why is someone who does not care about group flourishing bound anyway?
Theism grounds obligation in a personal source, which fits how obligations work: they run between persons, not between a person and a chemical process. That answer can be disputed, but the question still needs one.
Common mistake
Any phrasing that implies atheists are immoral. It is false, insulting, and it ends the conversation you wanted to have.
Conversation-ready response
""I want to be clear that I think you are a good person and I am not questioning that at all. My question is different: what makes something wrong for everyone, including someone who does not care?""
Source notes coming soon.