So as you have pointed out, there are many kinds of neurons where neuroscientists observe a relationship between the “strength” of the stimulus, such as how bright a visual stimulus is, or how loud a sound is, and the firing rates of neurons involved in the processing of that stimulus. In this way, one can say that the firing rate of the neuron is “encoding” information about the strength of the stimulus. Put another way, if some part of the brain wants to know about how loud the sound is, it can monitor the firing rate of that neuron and use it to accomplish a task. So for example, when there is a loud unexpected sound nearby, you are apt to startle and jump. So neurons that control the muscles that are reacting to the sound respond when the stimulus (the sound) is loud, but not when it is quiet. One way they can do this is by monitoring the firing rate of neurons in the auditory processing centers, and responding only when their firing rates are high.
This of course seems almost trivial and so you are right to ask what else firing rate can tell us.
One answer is that stimuli have many more complicated features than just the “strength” of the stimulus. To use the visual system as an example, you might look at a two visual scenes that are equally bright, but one has a horizontal line, and another has a vertical line. There are actually neurons in your visual cortex that respond selectively to the vertical line, and others to horizontal lines. Meaning there are particular neurons that fire at a high rate when the vertical line is present, and a low rate when the horizontal line is present, or vice versa. As you move deeper and deeper into visual processing areas, you find neurons that respond selectively to more and more complicated features of the visual scene. Some neuroscientists have even found neurons in human brains that appear to respond selectively (fire more) when subjects are looking at particular celebrities, but not others. This basic concept I’ve illustrated in the visual system is equally true for brain regions encoding other sensory modalities. So in this way, firing rate, can really encode many different features of stimulus, beyond just the strength.
However, I don’t want you to give you the idea that firing rate of neurons can only encode features of the stimulus.
Neurons firing action potentials is part of the fundamental way that neurons signal information to each other in the brain, and the brain does much more than encode features of stimuli. For instance, the brain can choose to draw attention to a particular part of a visual stimulus, and one can observe a change in the firing rate of neurons responsible for processing that part of a visual scene. In this way, firing rate is also being modulated by the dynamic internal process we think of as attention. Similarly, if a stimulus has a profound meaning to you, such as if it represents something you are scared of, that can have profound effects on the firing rate of neurons. So in this way, differences in firing rate also reflect features of our internal world, rather than just the external one.