During take off and landing, headwind increases the airflow, hence the necessary lift is achieved earlier and at lower speeds (the wind speed is added to the aircraft speed). As a result, less runway is required to perform a safe take off or landing.