Mutualistic symbioses, such as lichens formed between fungi and green algae or cyanobacteria, have contributed to major transitions in the evolution of life and are at the center of extant ecosystems. However, our understanding of their evolution and function remains elusive in most cases. Here, we investigated the evolutionary history and the molecular innovations at the origin of lichens in green algae. We de novo sequenced the genomes or transcriptomes of 15 lichen-forming and closely-related non-lichen-forming algae and performed comparative phylogenomics with 22 genomes previously generated. We identified more than 350 functional categories significantly enriched in chlorophyte green algae able to form lichens. Among them, functions such as light perception or resistance to dehydration were shared between lichenizing and other terrestrial algae but lost in non-terrestrial ones, indicating that the ability to live in terrestrial habitats is a prerequisite for lichens to evolve. We detected lichen-specific expansions of glycosyl hydrolase gene families known to remodel cell walls, including the glycosyl hydrolase 8 which was acquired in lichenizing Trebouxiophyceae by horizontal gene transfer from bacteria, concomitantly with the ability to form lichens. Mining genome-wide orthogroups, we found additional evidence supporting at least two independent origins of lichen-forming ability in chlorophyte green algae. We conclude that the lichen-forming ability evolved multiple times in chlorophyte green algae, following a two-step mechanism which involves an ancestral adaptation to terrestrial lifestyle and molecular innovations to modify the partners cell walls.