H.J. Muller (Muller, 1914) first suggested that sex chromosome pairs evolved from a pair of autosomes. Dating estimates divergence of sex chromosomes at ~300MYA, shortly after mammals diverged from reptiles. Theorised this may have occurred in response to evolution of warm blooded organisms (mammals)
Sex determination in reptiles was dependent on external factors such as temperature: difficult to an influencing factor in self-thermoregulating organisms

In humans, Lahn & Page theorised that sex chromosome divergence may have begun with mutation of autosomal chromosomes to give rise to the SRY gene allowing for genetic control of sex determination

Once alleles relating to sex determination arise, recombination among these may lead to maladapted sexual phenotypes (Charlesworth 1996). As a result, natural selection may favour tightly linked genes involved in sex determination: the formation of a sex chromosome.

There are two forms of heterogamety: XX Females, ZZ Males (In different species)

Analysis of the Y chromosome is very important for understanding the evolution of sex chromosomes. The Y chromosomes are much shorter than their homologues. This is due to the lack of recombination of the Y chromosomes; causing them to suffer from increased incidences of deletrious mutation. This degeneration of the Y typically involves gene loss as well as chromatin state transitions, and as a result, Y chromosomes are smaller and largely heterochromatic.

There are five models explaining Y chromosomes degeneration:

Mullers ratchet
Background selection
Genetic hitch hiking
Weak Selection Hill-Robertson effect
“Ruby in the rubbish”

Degeneration of theY chromosome may have implications for the evolution of coding sequences on the X chromosome.

Conclusions: Sex chromosomes have evolved from autosomes independently in diverse lineage . The hallmark of sex evolution seems to be the degeneration of the Y chromosome. There has been several theories to explain the evolution of sex chromosomes vs autosomes. Literature seems to agreed with the fact that purifying selection and adaptive selection play a fundamental role in the rate of evolution