Captain, if they attack us , what do we do?
I am a bit confused over whether or not "what do we do?" Is correct in the previous context. Do we use the future simple tense instead?
It's not uncommon in informal English speech to substitute present indicative for future indicative, especially when you are talking about plans or consequences as opposed to predictions.
"At noon, we eat."
"If anyone touches this button, everybody in the room dies!"
"By the end of 2018, the Dow will hit 25,000."
(In the first two cases, the future would be correct as well, if a bit stiff; in the last case, the present would make no sense.)
The original sentence "Captain, if they attack us, what do we do?" is perfectly idiomatic and correct.
A more formal phrasing is, "what should we do". The speaker is asking for orders or instructions, and that takes "should" or "ought".
The simple future, "what will we do" would only be correct if the speaker were asking the Captain for his prediction of the reaction of speaker and his friends will be to an attack -- "what do you think we will do" -- and I don't think that's the case.
Albeit bit personal but here is another view on the difference:
What do we do
is about reacting to a particular situation. There are maybe protocols that change based on who is attacking. Meaning here THEY are significant for the context. Maybe you can pull punches or go all out or do other things depending on who They are.
What should we do
in general, like what do we do in case of an attack, from anyone.