Profits of United Virginia Bank-shares Inc. rose a modest 4 perent in the second quarter of 1981, while profits of Riggs National Corp. were off by 7 percent compared with the same period last year, the big regional banking firms reported yesterday.

Richmond-based UVB, the largest commercial banker in Virginia, listed second-quarter operating profits of $8.8 million ($1.62 a share) compared with $8.4 million ($1.56) a year ago. Net income, counting gains or losses from selling securities held as investments, declined 4 percent to $8.1 million ($1.50) from $8.5 million ($1.57).

Chairman Joseph Jennings said yesterday that second-quarter results were adversely affected by declining profit margins on loan transactions. Loan volume rose 9 percent to $2.4 billion in the period, continuing a pace set in the first quarter.

Based on a strong first quarter, however, profits from operations for the first six months were up 17 percent to $19.2 million ($3.55) from $16.3 million ($3.03). Assets stood at $3.69 billion on June 30, up 11 percent from a year ago.

Riggs National Corp., the new holding company for Washington's Riggs National Bank, reported that second-quarter profits fell 7.3 percent to $6.58 million from $7.1 million a year earlier, but there were no per-share figures. A press release attributed the decline primarily to a narrower margin between costs of money and interest rate returns as well as a decrease in noninterest-bearing source funds. No other second-quarter details were published.

For the first six months, Riggs earnings before and after securities transactions declined 3.7 percent to $12.1 million ($4.04 a share) from $12.5 million ($4.19). Assets rose 20 percent in the past year to $3.5 billion, deposits were up 24 percent to $2.9 billion, and loan volume expanded by 15 percent to $1.6 billion.