How did the two sides communicate with each other during WW2 in order to exchange information like prisoners lists and letters, or to arrange talks?

by Abrytan
Georgy_K_Zhukov

The International Committee of the Red Cross was the principal organization for oversight of prisoners of war, with Switzerland designated as the protecting power for both sides, roles laid out in the Geneva Convention of 1929 which regulated POW treatment (and of course, being based in Switzerland, the ICRC was mostly operating with Swiss citizens blurring the lines anyways). Although the Eastern Front and Pacific War were another matter entirely, for the most part, the Red Cross and Swiss observers were given necessary access to POW camps run by the Western Allies, as well as Germany and Italy, where they could monitor to ensure that the detaining powers were complying with what was expected of them, and communicating this back to the home country of the prisoners. Although they lacked actual enforcement powers, they nevertheless were important advocates for the conditions POWs found themselves in, and their reports could still hold great weight, as the detaining power knew that poor compliance being reported across the lines could easily result in reprisal behavior to their own men held in captivity.

As regards your specific question though, the Red Cross and the Swiss government were the conduits for those matters. The rolls of prisoners held would be communicated through the ICRC who kept records of the names and would forward the lists to the respective home countries. Mail and parcels were handed into the care of the ICRC who would oversee their transit and eventual delivery, although it can be noted that the care packages sent to the troops were by a great majority coming from the US, often to the consternation of the Germans who reacted by cutting food rations with the expectation that the POWs were making up for it with the volume that they were receiving from home (still technically a violation of the 'rules' though). One relatively mundane example of reprisals, which relate to the mail comes from German POWs held in Australia who complained that their mail was arriving very slowly, duly reported by the camp inspectors. The Germans, in turn, started withholding mail to Australian POWs until they were informed that delivery speeds had improved.

For more, see Vasilis Vourkoutiotis "What the Angels Saw: Red Cross and Protecting Power Visits to Anglo-American POWs, 1939–45" Journal of Contemporary History Vol 40(4), 689–706.