Your odds of dying while in military service aren't that much higher for most military personnel in 2006 than they were in peacetime 1980. Death rates for active duty service members are double what they were in the years immediately prior to the war, largely as a result of hostile action casualties, but are only about 20% higher than they were in the early 1980s, a peace time period.
Three big factors have offset deaths from hostile action in Iraq and Afghanistan: fewer accidents, fewer deaths from illnesses and fewer non-combat or terrorism related homicides.
First, far fewer soldiers are dying in accidents. In absolute terms, the number of accidental deaths in the U.S. military have been consistently about two-thirds lower than they were in the early 1980s. Even adjusting for the fact that the active duty military is a third smaller now than it was in the early 1980s (indeed, the active duty military force is actually smaller than it was on the eve of the 9-11 attacks in 2001, despite the fact that we are fighting two regional wars), the rate of accidental death for soldiers is still consistently down more than 50% from the early 1980s. This probably has to do with a combination of improved safety engineering of military systems and facilities, and improved medical care.
Over the duration of the Iraq War, fewer accidental deaths have saved about 1,800 lives of active duty military service members.
Second, there have been significant reductions in the number of military personnel who die from illnesses, with the rate of deaths from illnesses down about 12%. This is probably due to increased quality of medical care, in part, due to advances in medicine generally.
Over the duration of the Iraq War, fewer deaths from illnesses have saved about 210 lives of active duty military service members.
Third, there has been a significant drop in the number of active duty service members who are victims of criminal (as opposed to terrorism or hostility related) homicides. The homicide victimization rate in 2006 for active duty service members was about two-thirds less than it was in 1980. This coincides with a generally reduction in the U.S. homicide rate (most soldiers spend most of their time in the United States and many live outside military bases), and with improved medical care.
Over the duration of the Iraq War, reduced homicide rates have saved about 80 lives of active duty military service members.
Overall, increased safety, health treatment and reduced homicides of service members have saved about 1,990 lives. Certainly, it is still more dangerous, on average, to be in the military now than it was in peace time, and this is particularly true if you happen to be in the Army or Marines in a military occupational specialty that could put you out and about in Iraq or Afghanistan. But, if you are in the Air Force or Navy, or in some military occupational speciality that keeps you out of the war zone, you are probably safer now than you were in the early 1980s.
Also, contrary to the widespread myth in military analyst circles that reduced accidents are tied to fighting wars, the reduction in accidents has actually been a gradual but persistent one over time, and the accident rate has actually increased during the Iraq War as the pace of operations has stepped up. The same trend has been observed in deaths from illnesses. They have gradually fallen but spiked modestly since the Iraq War began.
The suicide rate of active duty military personnel has remained roughly constant for the entire time period from 1980 to 2006. The suicide rate during the Iraq War has been roughly 18% higher than it was in the four years prior to the Iraq War, resulting in roughly 100 more suicide deaths than would have occurred in the rate of the previous four years has continued. But, the increased suicide rate, because suicide rates are based on quite small raw numbers of suicides each year, exhibit a great deal of variability, and this increase, while probably statistically significant, is just barely statistically significant.
The causes of suicides by service members have been studied at some length, but, as the number show, no one has discovered and implemented a way to meaningfully reduce the incidence of these suicides.