What you state in the question is idiomatically correct in standard English. Asking someone "Are you hot?" or "Are you cold?" is normal, though a bit informal. (That is, it's probably something you'd say to family members and friends.)
If addressing someone you don't know (or don't know well), such a question might seem a bit direct or "personal." In that case, it's probably more common to direct the person to the potential source of heat or cold. For example, "Is this open window producing too much of a breeze?" Or, "The thermostat is set to X. Does that seem okay?" Sometimes if you sense another person is uncomfortable, you might just offer an action as a remedy, too. For example, "It seems a bit stuffy. Shall I open a window?"
As noted in comments, another way of getting around the direct approach is sometimes to ask the question in general terms, rather than asking for personal comfort level, as in, "Does it seem hot in here?" or even just, "Is it hot in here?" It's still the same question, but less directed at another person's comfort level. (In casual circumstances in American English, you can also utter, "Is it hot in here, or is it just me?" when you're uncomfortable but trying to gather information about others' comfort level.)
These latter options are only necessary if you're less familiar with the person you're addressing and/or it's unclear that you are the person who could control the temperature. If you know the person you're addressing and it's in a social situation where you should clearly be the one to raise/lower temperatures, or open/close windows, or whatever, it's also common just to ask, "Are you hot/cold?"