why is it colder the higher the elevation
Air at higher altitude is under less pressure than air at lower altitude because there is less weight of air above it, so it expands (and cools), while air at lower altitude is under more pressure so it contracts (and heats up).