Evolution of sexual reproduction from asexual
Sexual reproduction is a process where two cells fuse to form a diploid cell. Unicellular organisms (or even multicellular lower organisms like alga, fungi and protists) prefers to reproduce by asexual means under favourable conditions. But when the conditions become unfavourable, they opt to follow sexual reproduction. This suggests, sexual reproduction evolved to increase the chances of survival under unfavourable condition. 

So how does sexual reproduction helps in increasing survival rate? By fusion of cells i.e., sexual reproduction a cell now becomes diploid and hence have two copies of its genome. This increased copy of genome is beneficial in repairing any breaks or alteration in genome, as the other copy will act as a template for repair (via homologous recombination).

To get a better hold of this, let us take an example. Let there be a population of haploid cells. This population was exposed to conditions which would cause damage to genome, specifically would cause breaks in DNA. There were two cells "Fella A" and "Fella B". They both knew that their genome has suffered damages, but neither was successful in repairing the DNA as they required an intact DNA template for repair. Suddenly "Fella B" came up with this great idea to fuse with "Fella A". This would work, reasoned "Fella B", as the position of damage in the DNA in his genome is different from the position in "Fella A". Fusion of cells was the first step towards evolution of sexual reproduction. 

Later on the biological system realised importance of variation generated by sexual reproduction and hence this mode of reproduction caught on with various lineages.