You can think of a lion’s mane as being a lot like the peacock’s tail: it serves to get female attention and also signals that this guy with the gorgeous mane is in peak condition and ready to mate for some healthy offspring! But at a certain point, that lovely head of hair starts to cook you (YOU try wearing a scarf in the summer!), and so you get thicker, more impressive manes from lions in colder climates, while those in the really boiling temps look a little under-grown in comparison. For example, the so-called “Man-eaters of Tsavo” (whom the movie “The Ghost in the Darkness” is based upon) that terrorized the building of the British railway in late 19th-c. Kenya, basically had no mane at all and looked more like lionesses! You can visit these man-eaters at the Field Museum in Chicago!
BUT WAIT, there’s MORE:
Just when you thought only male lions had manes, we’ve learned of rare females in Botswana that have masculinized features like manes. These features are probably due to high levels of male hormones in their mothers during pregnancy, but they certainly keep our explanations of manes lively!
To add to Lindsay’s answer, lion manes also protect them from enemies – mostly other lions. Cats often go for the neck when killing prey or in fights, and having a thick head of hair protects this weak point a lot.