I imagine the answer would vary by country.
The German Uboat force, by the end of the war, had 32,000 dead out of a force of roughly 40,000 men. I believe it was the deadliest branch of the German Armed Forces.
Kamikaze pilot was the most dangerous job in WWII.
The VIII Air Force had 48,000 casualties out of a total of around 350,000 total soldiers who served in the unit during WW2, but that number is a bit misleading because the casualties were almost all air crew and the total includes ground and air crews. Bomber units had particularly bad casualty rates, around 50% was typical, but the earliest crews fared the worst. Only around 20% of the bomber crews who served with the 8th in 1942-43 survived unscathed, they had the highest casualties of any major outfit in the war on the American side.
Here is a link to the VIII's official fact sheet: http://www.mightyeighth.org/Library/PDFs/8thAFfacts.pdf
RAF Bomber Command suffered 44% total casualties (55.5k of 125k) - an average loss-rate per-sortie of approximately 5% meant that British aircrew's odds of completing their 30 mission tour weren't in their favour.
To the best of my knowledge, this overall attrition rate was only beaten by German U-Boat crews (as mentioned in another post).
Infantry and that will be pretty much universal. They have to be on the pointy end of the stick (spending more time in combat is correlated with increased likelihood of becoming a casualty), they've got no armor, and almost everyone and everything is aiming to kill them in particular. Within infantry, airborne infantry would be the most dangerous position (if memory serves, expectations were 10% casualties just from the drop). Quoting from "Personnel Attrition Rates in Historical Land Combat Operations: Losses of Divisions and Lower Level Combat Forces"
Within corps and other echelons above division (EAD), divisions take the overwhelming majority of the casualties. Within divisions, infantry regiments and brigades account for the overwhelming majority of the casualties. Within brigade or regimental sizes units, infantry battalions take the overwhelming majority of the casualties. This is true even in armor divisions. Within all units, personnel in the infantry branch of the service account for the overwhelming majority of the casualties.
Page 4-30 has a table showing casualties for the battle of Okinawa. 48.56% of US infantrymen became casualties, representing 87.11% of all US casualties. Cavalry suffered the next highest percentage, 13.93%, but that's probably more related to their low numbers.