The combat level is a players or monsters difficulty indication. A green color indicates the opponent is a much lower level and, theoretically, will be easy to kill. When a level is slightly lower than yours it will be a yellow-ish color, when they are equal to your combat level they will appear yellow. It will appear orange and red when they are higher than you.
There are a few formulas that are used to determine a combat level, however, there are much easier ways for a player to determine it such as using a online calculator for it.
Base = 0.25(Defence + Hitpoints + floor(Prayer/2))
Melee = 0.325(Attack + Strength)
Range = 0.325(<code>floor(Range/2) + Range)</code>
Mage = 0.325(floor(Magic/2) + Magic)
Final = floor(Base + Highest of Melee, Range or Mage)
Melee combat level = floor(0.25(Defence + Hits + floor(Prayer/2)) + 0.325(Attack + Strength))
Ranged combat level = floor(0.25(Defence + Hits + floor(Prayer/2)) + 0.325(floor(R/2) + R))
Magic combat level = floor(0.25(Defence + Hits + floor(Prayer/2)) + 0.325(floor(M/2) + M))