The process in which relatively unspecialized cells, e.g. embryonic or regenerative cells, acquire specialized structural and/or functional features of a mature cell found in the lung. Differentiation includes the processes involved in commitment of a cell to a specific fate.