Food prices soared in the Washington area by 3.1 percent in June while rising only 0.6 percent nationwide, according to figures released yesterday by the Labor Department.

The sharp rise came after five months of relatively stable food prices in the area. Between December and May, area grocery stores raised their food prices by only 1.9 percent and during May actually cut prices by 0.3 percent.

The main reason for last month's jump was a sharp rise in fruit and vegetable prices. The Bureau of Labor Statistics, which publishes the figures, pointed to especially big rises for oranges and other fresh fruit. Prices for dairy products also went up unusually in the month.

An analyst in the Bureau of Labor Statistics explained that many stores were charging the same price for fruits in June as in May, although the new fruits were smaller. This pushed up the price index, just as if there were a price rise for fruit which is the same size.

The price index for fruit and vegetables went up by 10.2 percent between May and June locally. In June 1979, there was a jump of 9.7 percent. Nationwide, fruit and vegetable prices were up last month by only 1.4 percent.

There was probably a large seasonal element in the price rise for this food category. New fruits and vegetables such as peaches, squash and green beans all came into Washington shops last month. Many of them were considerably more expensive than when they went out of season last year.

Much of the rest of the country gets the new-season crops later than Washington. In May the area benefitted from smaller food price rises than the national average.

A Department of Agriculture staff economist suggested that as Washington starts to get its fruit and vegetables from the West Coast rather than from Florida, prices could go up because of additional transportation costs.

Prices for dairy products in the Washington area rose by 3.6 percent for all urban consumers, and by 2.6 percent for wage earners and clerical workers. In May these prices had gone up by just under 1 percent for all consumers and by about half that for the wage earners and clerical workers.

Across the country as a whole, dairy prices rose by just 0.4 percent last month. The big Washington rise was attributed to increased costs of ingredients, such as milk, butter, and sugar for ice cream.

Sugar and candy prices were among those which increased particularly in Washington in June. Others showing marked rises were milk, potatoes, pork, poultry, frozen fruits and fruit juice.

The outlook for food prices is not particularly good. Many analysts expect beef prices to rise for the whole of the nation, and the recent spell of very hot and dry weather in the Corn Belt states could lead to higher grain prices.