In general, it is safe for pregnant women to fly on an airline. However, as with all things pregnancy related, there are factors to be taken into consideration.
Checking with a health care provider before buying tickets is a good idea, as there a number of conditions that might make your doctor give you certain restrictions regarding what weeks of pregnancy not to fly, length of flights, etc.
It is also a good idea to check with the airline in question, as the carrier might have policies, procedures and options for pregnant women.
While flying is usually safe for pregnant women, it is not always comfortable. Seat belts might be harder to put on, low cabin humidity brings on dehydration, and circulatory issues due to inactivity can happen on longer flights.
The best general time to fly during pregnancy is the second trimester, approximately weeks 14 through 28. Morning sickness has typically passed, and general risks of premature labor or morning sickness are at their statistical lows.