Though the origin of the term is debated, “Davy Jones’ locker” is an idiom for the seabed, where deceased sailors find their graves.
To “kick the bucket” is often explained as a suicidal person kicking out the bucket they stand on so they can hang by a noose. However, this term more likely derived from animal slaughter. A “bucket” in this context was a word for a pulley or beam that animals were pulled up by, often by their hind legs. The doomed creatures then frequently kicked this “bucket” during the spasms and thrashing of slaughter.
The term “bite the dust” has been around in some variation since the the Illiad. That poem uses the term to describe Roman soldiers dying in battle, the King James Version of the Bible has a reference to lick[ing] the dust, and was used again a old Western book from 1748 (and by Western movies later), and of course that earworm Queen song.
The slang “to croak” for dying comes from the gurgling or “death rattle” sound sometimes made by the dying.
“Six feet under” is an idiom for dead, but bodies can legally be buried quite a bit shallower. In many US states, only 18 inches of dirt need to cover a coffin, which makes for a hole about four feet deep. The 6-foot order began as a London mayor’s reaction to the plague hitting the city in 1665, but no reason was given for that depth. However, the risk of several unpleasant contingencies are reduced by deeper graves, including the body being reached by animals, grave robbers, or accidentally plowed up by a farmer.
The reference to “shuffl[ing] off this mortal coil” is from Hamlet, in which Shakespeare means the tribulations and turmoil of this life, as “coil” meant at the time.
Although there are earlier variants about daisies, “pushing up daisies” as a euphemism for dead and buried seems to have started in the British military in WWI. A similar French idiom translates to “eating dandelions by the roots,” as one under the ground would do.