If a military pilot is captured by an enemy, how can he indicate that he has run out of ammunition to engage in combat or is not in a position to retaliate? Does he use lights, radio, and/or flares?
There is no universally accepted means of surrendering an aircraft. According to Humanitarian Policy and Conflict Research at Harvard University,
Aircrews of a military aircraft wishing to surrender ought to do everything feasible to express clearly their intention to do so. In particular, they ought to communicate their intention on a common radio channel such as a distress frequency.
They can do other things like rocking the wings, jettisoning the weapons, flashing navigational lights etc. However, none of these are universally accepted or even have a clear meaning in the heat of combat. So the best course of action will be to bail out.
If a pilot is captured by an enemy, there would be no need to surrender.
If the pilot engaged in combat, and simply ran out of ammunition, surrendering isn't something that has to be accepted by the opposing party. The rule is, you need to surrender on first sight of the enemy. Once you engage in combat all bets are off and you can be destroyed even if you release the canopy and throw up your hands (not recommended!) See, people get a peculiar sentiment when you shoot at them. They appreciate that you missed, but they don't take kindly that you offered surrender after you go winchester on the missiles and bullets.
Also, while you are surrendering. Assuming you didn't engage in combat, consider learning the other side's language and make sure you surrender in a top of the line aircraft. For example, Viktor Belenko defected in a Mig-25 in 1976 by flying it to Japan. This was a very valuable aircraft which he traded for a carton of American cigarettes and a million dollars. (ok just kidding, but he did get a nice trust fund set up for him when President Ford accepted his asylum plea.)
Generally theres no surrender bail out, In the pacific theater during the Second World War there was no aircraft surrenders. In fact even if the pilot chose to bail out of his aircraft (American Pilots) they would be strafed while in their parachute, and even if they had made it to the water. ( Japan did not sign the Genova accord) For this reason many American pilots returned the favor and would go so far continue shooting at the already critically damaged Japanese fighter.
In WW2, USAAF bombers would some times signify an intent of the aircrew to bail out of a shot up bomber, by dropping the landing gear. The hope was that the attacking fighters would stop shooting, and not kill more of a crew that was just trying to get out and would be captured upon reaching the ground.
This was not official policy on either side, but it was occasionally done, and occasionally respected.