Citing increased competition and lower gross margins, Circuit City Stores, the nation's largest specialty retailer of brand-name electronics products, announced a slight decline in earnings for the first quarter ended May 31.

The Richmond-based company said net earnings for the quarter were $3.3 million (30 cents per share), compared with $3.4 million (34 cents) for the first quarter of the previous fiscal year, which was the strongest in its history.

Despite the earnings drop, Circuit City said sales increased 37 percent over the year-previous quarter from $93.6 million to $128.2 million.

Computer Network Corp. of Washington said it lost money for the second straight year, recording a loss of $468,000 (22 cents per share) on revenue of $22.8 million for fiscal 1985. This compared with a loss of $886,000 (46 cents) during the previous year.

The loss came despite a strong fourth quarter, ended March 31, in which the company enjoyed net earnings of $513,000 (21 cents) on revenue of $8.8 million, compared with earnings of $29,000 (3 cents) and revenue of $2.7 million.

The company, which provides a variety of computer services, attributed the fourth-quarter upswing in part to the activities of its Ford Laboratories subsidiary, a manufacturer of vitamins and nutritional supplements acquired in October 1984. Having been hard hit by the loss of government contracts, COMNET also is seeking more data processing business from commercial clients.

Math Box Inc. reported a profit for the quarter ended April 30 of $391,444 (13 cents) on sales of $17.6 million. The company earned $189,243 (8 cents) on revenue of $6.6 million for the same quarter one year ago. Results for the first quarter do not include the purchase of Microsource Financial Inc. of Boston on May 1 for $6.1 million.

Rockville-based Math Box, which has been trading under the name of MBI Business Centers (its name was formally changed to MBI Business Centers Tuesday), went public last year. The company sells personal computers and related products to the federal government and private businesses.

Penril Corp., also of Rockville, reported earnings of $297,000 (14 cents a share) on revenue of $16.7 million for its third quarter that ended April 30, compared with $672,000 (32 cents) on revenue of $19.7 million.

The lower earnings resulted in part from a downturn in the computer and consumer electronic markets, according to the company.