"There are no atheists in foxholes" is a saying that means, roughly, that when things are bad, everyone turns to God for help. The same sentiment has been expressed in other forms. Having little power as an argument for the existence of god, this is often used to undermine atheists directly, by asserting that despite all arguments, in a moment of crisis they too will seek a higher power.

Counter-arguments

This is an incredibly weak argument. In essence, it boils down to

I am not strong enough to handle all of life's problems on my own.

Therefore, I want a higher power to help me.

Therefore, that higher power exists.

While the first part is almost universally true, and the second is certainly understandable, the conclusion does not follow. Wishing for something does not make it true.

People in desperate situations take desperate measures, even if they only have a small chance of success. A person who has gone into cardiac arrest may want a doctor to use a defibrillator to restart their heart. But this does not mean that applying electrified paddles to people's chest is a good idea in general.

Real-life counterexamples

Even taken literally, the saying is not true. Many atheists have served in the military and have seen combat.

Pat Tillman - an American Football player who joined the military and died fighting in Afghanistan.