Any wave can be used to encode information. However, certain frequencies are better than others. Higher frequencies generally allow for greater bandwidth, because a given frequency range will be smaller and smaller in comparison to the carrier frequency as we increase the frequency of the carrier. Other facts are the ability to guide the wave when needed. We can easily guide RF and lower frequencies using simple circuits. Microwave frequencies will start to require some thinking about layout and design rules and higher than that it becomes more problematic. For example, infrared and visible light can be guided using fiber optics but the basic nature of how fiber works can be more lossy than a traditional microwave guide that can use a conductor for shielding against leakage.
In addition, the transmission through materials plays a role. While radio frequencies can easily transmit through plaster, stone, and other common building materials (minus metals), higher frequencies like infrared (or obviously visible light) will be absorbed or reflected too much to be used to transmit with anything other than line of sight (and even then, stuff like water vapor can be highly absorptive of certain frequencies).
The information is encoded by making use of the amplitude and phase of the signal. By manipulating the amplitude and phase of the wave we can denote a certain bit stream for a digital signal or encode an analog signal using amplitude modulation or frequency modulation like with analog radio signals. Digital encoding is better because we only assign certain points in the phase space as being associated with a bit stream. This allows us to use error correction techniques since we can measure noise that gets introduced into the signal and remove it and find the most likely desired bit stream.