The germans announced that Yakov killed himself out of cowardice by jumping on an electrified fence.
The official russian response at the time was that Yakov died after being shot brutally while trying to escape the camp, accusing the germans of brutality.
The currently accepted western response is that Stalin refused to exchange PoWs for the life of his son. Yakov, depressed after being abandoned by Papa Stalin, killed himself.
Other sources indicate that he was in fact depressed, but it was a personal confrontation with a British Officer that triggered the suicide.
Milan Kundera expands on the british confrontation, with a more detailed and entertaining explanation of the event:
Not until 1980 were we able to read in the Sunday Times how Stalin's son, Yakov, died. Captured by the Germans during the Second World War, he was placed in a camp together with a group of British officers. They shared a latrine. Stalin's son habitually left a foul mess. The British officers resented having their latrine smeared with shit, even if it was the shit of the son of the most powerful man in the world. They brought the matter to his attention. He took offense. They brought it to his attention again and again, and tried to make him clean the latrine. He raged, argued, and fought. Finally, he demanded a hearing with the camp arbiter. But the arrogant German refused to talk about shit. Stalin's son could not stand the humiliation. Crying out to heaven in the most terrifying of Russian curses, he took a running jump into the electrified barbed-wire fence that surrounded the camp. He hit the target. His body, which would never again make a mess of the Britishers' latrine, was pinned to the wire.
Will we ever know if the son of Stalin’s shameful diarrhea caused the depression that lead to his death?