There are many different theories as to why zebra have stripes; here are the three most common theories.
1) Zebras' stripes are like fingerprints with each and every zebra having a different set of stripes. When a female zebra gives birth she will try as much as possible to prevent the newborn foal from seeing other zebras' strips for a few days. By standing between the foal and other zebras in the herd the youngster then can only see its' mothers' stripes and in doing so learns them. The foal is then able to find its' mother just by sight.
2) The second theory has to do with a type of camouflage against predators like lion.
The lion apparently does not have a very detailed and full-colour vision. When Zebra are being chased by predators they will often run close together, making it difficult for the predator to spot the youngsters, as all they would see is a confusing arrangement of black and white stripes all blending in together.
3) The third theory in an interesting one, which is difficult to believe.
The black stripes on a zebra will absorb a lot of heat from the sunlight, whereas the white stripes will reflect a lot of heat. The result of this is the downward movement of air from the black stripes and an upward movement of air from the white stripes, which then creates many small whirling winds on the zebra body. This movement of air is said to cool the zebra down.