There is a best length for RX and TX which is theoretically the same and depends on the frequency being used. Often, the length is 1/4 wavelength.
For transmitting there is an additional factor through: the transmitter output stage will be most efficient if it drives a matched impedance load. The length of the antenna determines it's impedance so there is an optimum length to get best power out and therefore best range. Note that there are various 'tricks' to electronically match the impedance which give some improvement in output, although not as good as an ideal antenna, while reducing external wire length.
Receiving isn't as important although it still works best if the length is correct. It's easy to make up for variations in signal strength by using an automatic gain control circuit that adapts the receiver to pick up weak signals while not overloading on strong ones. that gives greater flexibility to the receive antenna length.
Brian.