Lt. Gov. Charles S. Robb declared for governor today with an aggressively partisan speech urging repeal of Virginia's sales tax on food, which he said "impacts so disproportionately" on the poor and elderly.

Robb, who will face Republican J. Marshall Coleman in the state's November elections, claimed only a Democratic chief executive could push repeal of the controversial 4 percent tax through Virginia's Democratic-controlled legislature.

His call for repeal of the food tax -- long a populist issue in the state -- illustrated how Robb apparently will attempt to rebuild the badly divided Virginia Democratic Party that until the late 1960s was able to dominate the state. Robb today married his tax cut plea with an appeal to the state's dominant conservative faction to return to the party.

"Democrats in Virginia -- not Republicans -- chiseled the commandments of fiscal conservatism into the laws and traditions of our commonwealth," said Robb.

Robb, a McLean attorney and son-in-law of former president Lyndon Johnson, tempered his call for an end to the food tax by declining to set a specific timetable for its repeal. He suggested he might support its gradual reduction over several years.

Nonetheless, Robb's call for food tax repeal -- in marked contrast to Coleman, who has called such tax-cut rhetoric "premature and irresponsible" -- promises to become an early and important issue in the campaign and belies the idea that both candidates will take identical stands on every major question.

A bill cutting the 4 percent tax in half passed the House of Delegates earlier this year but was killed by a Senate committee. Robb did not support that measure, contending that the state budget was too tight to support such a cut this year.

While Robb emphasized that it was the Democratic Party that has made Virginia a citadel of conservatism, he won the largest applause from party loyalists who jammed his kickoff rally at the John Marshall Hotel here when he invoked such traditional Democratic issues as tax relief, civil rights and aid to education.

"His speech had a little something in it for everybody," said Virginia NAACP director Jack Gravely, one of the few black community leaders who attended the speech.

Like Coleman, Robb wrapped himself in what he called the "Virginia heritage" of individual liberty and limited government. But while Coleman invoked President Reagan and GOP Gov. John N. Dalton as his role models, Robb stressed his ties to the conservative Democratic leaders of the state's General Assembly, virtually all of whom appeared on the podium today to give him their endorsement.

Near the climax of his 20-minute speech, the normally subdued Robb was pounding the podium with his fist and shouting over prolonged applause. He called for the election of a Democratic governor, lieutenant governor, attorney general "and most important of all, another Democratic General Assembly."

Democratic party strategists have said that such enthusiasm will be vital if Robb is to overcome the divisions and problems that have kept the state's Democrats out of the Governor's Mansion here since 1969. Today Robb appealed to many of the Democratic party traditional voting blocs.

Employing high-tech rhetoric that is likely to become familiar in his media-oriented campaign, Robb made one such appeal to the state's 65,000 public school teachers. Robb said the state government must have "no higher priority . . . than our commitment to public education."

For a candidate whose opponent is trying to portray him as an heir to the big-spending politicies on national Democratic liberals, Robb's opening salvo, delivered here first and later in Northern Virginia and Norfolk, surprised many, pleasing some and disappointing others.

One Capitol Hill Democrat said the speech "sounded more like that of a real Democrat" than excerpts of an earlier draft he had heard. He said traditional Democrats believe that "Lynda has been telling Chuck that he can be a moderate, or even a conservative, but there are some basic principles of the party he can't walk away from."

Jack Sweeny, an aide to Robb, later denied the suggestion that the speech had been altered to make it "more Democratic." Sweeney said the basic thrust of the speech had not been changed since a first draft was written in January.

Unlike Coleman, who broke tradition by attacking his opponent by name in his opening campaign speech on Monday, Robb didn't even mention Coleman by inference.

Conspicuous by their absence today were black Democratic leaders, including Richmond Mayor Henry Marsh and L. Douglas Wilder, Virginia's lone black state senator. Wilder said later the absence of black leaders "was not by accident . . . we've got a number of questions and concerns that still need answers and quite frankly the appearance of unity when there is no unity would be foolish."

Wilder said he personally plans to support Robb but that a number of other black leaders are still "smoldering" over Robb's role in the controversy surrounding the Carter administration's abortive effort to have a black appointed a federal judge in the state.

The state's black political leaders will meet here on April 4 to decide whether to support either Robb or Coleman.

At the other end of Virginia's political spectrum, the Richmond rally heard letters of endorsement from two former Byrd machine governors, William M. Tuck, A segregationist who served in the late 1940s, and 83-year-old Colgate W. Darden, a moderate who served from 1942 to 1946.

The letter from Tuck was read by State Sen. Elmon T. Gray, a Southside conservative who had been mentioned as a possible independent candidate for governor this year.

In another display of unity, former House of Delegates Speaker John Warren Cooke was on the platform. Cooke also had been mentioned as a possible challenger to the 41-year-old Robb, who will receive the party's nomination without opposition at a convention in Virginia Beach May 29-30.

Robb was introduced by another reluctant Robb supporter, State Sen. Hunter B. Andrews, a Hampton Democrat who had publicly derided Robb as "Chuckie Bird." By the time Andrews had finished his stem-winding praise for Robb, proclaiming him as "a worthy successor" to Thomas Jefferson and a string of more recent governors, including Mills Godwin "when he was a Democrat," the crowd was on its feet cheering.

Robb entered the hall, preceded by his wife and their two older daughters, Cindy, 12 and Kathy, 10, to the strains of the Marine Hymn, played by the 57-member band from Fairfax's Mount Vernon High School, from which Robb graduated in 1957.

(Two-year-old Jennifer Robb was at home in McLean with chicken pox.)

Lynda Robb then led the crowd in a singing and hand-clapping rendition of the old Democratic battle song, "Happy Days Are Here Again."

After the speech, which was interrupted by applause 26 times, Robb led the crowd in singing "Happy Birthday" to his wife. She was given a bouquet of balloons, which she carried throughout the hall afterwards while greeting supporters.

Republican Coleman, campaigning in the Tidewater area, replied to Robb's tax cut proposal through an aide. "It's easier to hold out a carrot than find a responsible way" to cut taxes, said Anson Franklin, the Coleman spokesman. Franklin claimed Robb had twice endorsed the idea of eliminating the food tax, and "the last time he said revenue-sharing could make up the difference. Well, he can't rely on that any more."

Franklin said Coleman, too, would like to reduce the tax on food, and prescription drugs and real estate, but asked, "Where is Robb going to get the revenue to replace the food tax, which generated about $250 million in 1980 in a general fund budget of more thatn $3 billion?"

As to Robb's assertion that a Democratic governor is needed to get programs through the Democratic legislature, Franklin noted that "It hasn't been necessary the last 12 years," when Republicans occupied the Governor's Mansion.

Robb returned to his home base in McLean for an evening rally in the Northern Virginia suburbs where most observers believe he must stop Coleman to gain the governorship. The crowd he drew to his Tysons Corner campaign headquarters covered a wide ideological spectrum from such conservatives as former House Majority Leader James Thomson of Alexandria to such liberals as former U.S. representative Herbert Harris of Fairfax.