Riggs National Corp., which owns Washington's biggest bank, said yesterday that it earned $8.26 million ($1.38 a share) in the second quarter, 28.9 percent more than the $6.41 million ($1.07) it earned during the three months ended June 30, 1984.

For the first six months of the year, Riggs reported profits of $15.6 million ($2.60), 14.7 percent more than the $13.56 million ($2.27) it earned during the first half of 1984.

Meanwhile, Washington Bancorp, which has been plagued by problem loans for the last year, reported that its earnings declined 18 percent to $2.3 million ($1.65) in the second quarter, from $2.8 million ($2.02) in the second quarter of 1984. Washington Bancorp owns National Bank of Washington, the District's third-biggest bank.

Riggs, whose only subsidiary is Riggs National Bank, continues to recover from a serious plague of problem loans that peaked in 1982. Joe L. Allbritton, who bought control of Riggs in 1981, has replaced nearly all top management at Riggs since then, worked off many of the bank's problem loans and returned the bank to its historical levels of profitability.

Riggs, which has assets of $4.97 billion, reported yesterday that its problem assets -- loans on which it is not being paid on time and real estate on which it has foreclosed -- totaled $21.6 million on June 30, more than 40 percent less than the $36.9 million of problem loans on its books a year ago.

By contrast, Washington Bancorp, with assets of $1.3 billion, has $26 million in problem loans.

American Security Corp., which owns Washington's second-biggest bank and has assets of $3.9 billion, reported Tuesday that its problem assets totaled $144 million. American Security, long Washington's most profitable bank until a string of bad loans came home to roost last year, has faced top management changes as a result. Chairman W. Jarvis Moody resigned in January and was replaced by Daniel J. Callahan III, formerly president of Riggs.

Luther Hodges, chairman of Washington Bancorp, said that the bank company has absorbed nearly all the losses from its loan portfolio and that it is in position "for a strong earnings performance for the remainder of the year."

For the first six months of the year, Washington Bancorp earned $4.6 million ($3.35), compared with the $5.3 million ($3.84) it earned during the first half of 1984.

The United Mine Workers of America has reached an agreement to sell its more than 70 percent ownership in Washington Bancorp to a group of New York investors.

In another development, Richmond-based Bank of Virginia Co. reported second-quarter profits of $10.95 million (85 cents), a 25 percent increase over the $8.75 million (69 cents) it earned during the second three months of 1984. Bank of Virginia, with June 30 assets of $4.6 billion, earned $21.1 million ($1.65) in the first six months of the year, 20 percent more than the $17.6 million ($1.40) it earned during the first half of last year.

First Virginia Bank reported that profits jumped 9 percent in the first half of 1985. The bank said net income for the first six months of the year was $18.1 million ($1.26), compared with $16.6 million ($1.16) for the first half of 1984.

Total loans as of June 30 were $1.74 billion, up 12 percent from $1.56 billion at the end of the first half of 1984, the bank reported.

Security National Corp., which owns Washington's Security National Bank, yesterday reported second-quarter profits of $1.03 million ($1.12) compared with $847,000 (92 cents) during the second three months of 1984. Security has assets of $266.9 million.