A Southwest Airlines flight from Phoenix to Sacramento had to land in Yuma because of a sudden drop in cabin pressure, officials said.