Character-by-character: 碳 (carbon) + 水 (water) + 化合物 (compound) = 'carbon-water compound'. This mirrors the chemical formula Cn(H2O)n — carbohydrates are literally hydrates of carbon. A rare case where the technical Chinese term is a clearer description than the English.
register
In casual fitness/diet talk the clipped forms 碳水 (tànshuǐ) or the loanword 碳水 dominate. Use the full 碳水化合物 in formal/medical writing.