The link between buckets and death was made by at least 1785, when the phrase was defined in Grose’s Dictionary of the Vulgar Tongue:
“To kick the bucket, to die.”
Although there is not much evidence to support it, one theory as to why the phrase originates from the notion: people hanged themselves by standing on a bucket with a noose around their neck and then kicking the bucket away.