Southern Pacific Co. and Seaboard Coastline Industries Inc., two of the nation's largest railroad companies, have reported improved earnings for the second quarter of 1979.

Sopac profits jumped 93 percent even though fuel costs have increased 50 percent since the start of the year. Seaboard's earnings gain was a more modest 15 percent.

Benjamin F. Biaggini, chairman of Sopac, attributed his company's gains to increased freight traffic. Earnings were $58.5 million ($2.17 a share) compared with $30.4 million ($1.12) a year ago. Revenues rose to $667 million from $592 million.

Six-month profits rose to $92 million ($3.42) vs. $47 million ($1.74) as revenues increased to $1.26 billion from $1.12 billion. Biaggini forecast that because of an expected business downturn, Soapc does not expect recent earnings trends to continue for the next six months.

In another development, former Ford Motor Co. president Arjay Miller was elected to Sopac's board - subject to Civil Aeronautics Board approval, since he also is on the Trans World Airlines board. Miller, the retired dean of Stanford University's Business School, is a director of Ford, Wells Fargo Bank and The Washington Post Co.

Seaboard, which divides its headquarters operations between Jacksonville and Richmond, reported second-quarter profits of $36.6 million ($2.50) compared with $31.7 million ($2.17) a year ago. Transportation revenues rose 11 percent to $526 million.

Six-month earnings were $56.5 million ($3.87) vs. $32.7 million ($2.24) as revenues rose to $1 billion from $892 million. Chairman Prime Osborn said that although recent freight shipments were higher, the second-half outlook is clouded by soaring fuel costs and the possible auto industry strike.

Western Pacific Railroad Co. reported a deep dive of its second quarter earnings and skipped payment of a dividend.

Earnings were $890,000 (82 cents) on revenues of $42.2 million. In the same quarter of 1978, earnings were $3.7 million ($2.59) on revenue of $36.4 million.

The present Western Pacific is a new firm spun off from a holding company in April, and the comparisons are pro forma. Western Pacific had not missed a dividend since 1977.

Robert C. Flannery, its president, blamed the earnings dive on a rapid rise in fuel costs and on labor contracts negotiated before President Carter issued his wage and price guidelines. He said his firm adhered to the guidelines even though labor costs were going up at a higher rate.