This is one of the darkest chapters in early Muslim history and it is also one of the most complicated. The sources are partially conflicting and embellished by later traditions which have obscured what really happened.
Muhammad’s atrocity against the Qurayza Jews presents a good first discussion of the facts.
The below is a very exhaustive collection of source material and a first attempt of drawing conclusions. You might not agree with all our conclusions on this issue, but it will at least give you many sources nobody can ignore when trying to understand this incident. More can certainly be said and we would be glad to know of further sources giving more details that have so far not been taken into account.
Please read the following three part series in sequence.
The latter build on the information given in the former.
Investigation of further details and various arguments given as justification of the punishment:
Muhammad and the Jews
Muhammad and his enemies
Answering Islam Home Page