If you can’t hear pitches reliably, you will almost certainly pitch your notes out of tune when you sing. On the other hand, if you can reliably sing in tune, you clearly have a good sense of pitch, so you are not tone deaf.
The two concepts are not quite the same, but there is a very strong connection between them – and ear training can help with both.
So if you are tone deaf you cannot sing in tune. However as long as you can pass a basic pitch sensitivity test, you can cure your “tone deafness” and you can learn to sing in tune.
By doing pitch ear training to improve your sense of pitch you can more reliably identify when notes are too high (sharp) or low (flat). This will cure your tone deafness.
By doing singing ear training (and regular singing practice) to improve your ability to accurately sing the notes you hear in your head, you will be able to sing in tune.
How can you tell if you’re singing in tune?
The most common wa