According to Winthrop Sargeant,
The ancient Aryans who brought the Sanskrit language to India were a nomadic, horse- and cattle-breeding people who travelled in horse- or ox-drawn vehicles. Su and dus are prefixes indicating good or bad. The word kha, in later Sanskrit meaning "sky," "ether," or "space," was originally the word for "hole," particularly an axle hole of one of the Aryan's vehicles. Thus sukha ... meant, originally, "having a good axle hole," while duhkha meant "having a poor axle hole," leading to discomfort.
Joseph Goldstein, American vipassana teacher and writer, explains the etymology as follows:
The word dukkha is made up of the prefix du and the root kha. Du means "bad" or "difficult". Kha means "empty". "Empty", here, refers to several things—some specific, others more general. One of the specific meanings refers to the empty axle hole of a wheel. If the axle fits badly into the center hole, we get a very bumpy ride. This is a good analogy for our ride through saṃsāra.