The primary function of melanin in tigers is camouflage. The black stripes help to break up the tiger's outline and make it more difficult to see in the dense forest vegetation where tigers live. This camouflage helps tigers to avoid predators and prey alike.
In addition to camouflage, the stripes may also provide some protection from the sun's ultraviolet rays and help tigers to regulate their body temperature.