When is uncoded transmission optimal? This paper derives easy-to-check necessary and sufficient conditions that do not require finding the rate-distortion and the capacity-cost functions. We consider the symbol-by-symbol communication of discrete-time memoryless sources across discrete-time memoryless channels, using single-letter coding and decoding. This is an optimal communication system if and only if the channel input cost function and the distortion measure can be written in a form that we explicitly characterize. There are two well-known examples where uncoded transmission is optimal. The first example consists of a Gaussian source and a Gaussian channel. In the second example the source and the channel are binary. But these are just two out of infinitely many examples that one can construct in a straightforward way from our results. As a matter of fact, one can arbitrarily pick the source distribution, the single-letter encoder/decoder, and the channel conditional distribution, and make the system optimal by choosing the channel input cost function and the distortion measure according to the given closed-form expression. The paper also discusses the advantages of uncoded transmission for non-ergodic channels and multiuser communications. Finally, some results concerning $M$-block-length codes are obtained.