The debate over which candidate for governor of Virginia is tougher on illegal drugs revived yesterday with Democrats charging that Republican J. Marshall Coleman's staff had advised lawyers for drug smugglers on how to get their clients out of prison.

A new radio advertisement for Democrat Charles S. Robb accuses Coleman, the state's attorney general, of cutting back his office's technical support of local efforts to stem drug trafficking. "What's worse," the commercial says, "that same Coleman office counseled attorneys for convicted drug smugglers on how to expedite release of their clients from jail."

"Deplorable," said Coleman press aide David Blee yesterday. "There's simply not an ounce of truth to the whole ad."

The ad refers to the celebrated case of a Virginia state judge who last year ordered the early release of three convicted marijuana smugglers after they had served a few months of their multiyear prison terms. Robb's media consultant Robert Squier said the ad is based on a court document purporting that lawyers from Coleman's staff advised defense attorneys in the case on how they could speed the release of their clients after the judge's order.

"The point is," said Robb spokesman George Stoddart, "that Marshall has politicized this case for the last five months, but he hasn't told everybody that his office expedited the release of these drug smugglers and he hasn't told everybody that he lost the case."

"The point is," countered Ben Ragsdale, spokesman for the attorney general's office, "that this is a totally false representation."

"As far as telling us how to do it," said Ralph Robertson, one of the defense attorneys in question, "that is not true in my case . . . I guess the advertisement is literally true, but figuratively begs the substance."

What happened, as Robertson and another lawyer described it, is that when they learned that their clients were to be freed, they called Coleman's office. They asked, as one recalls, "What do I do so my client doesn't have to spend another night in the slammer?" They said they were told that the fastest way to complete the release was to personally deliver the court order to corrections officials.

Bagsdale said staffers did not learn which prisoners the lawyers were calling about until they read about the release in newspapers seven months later.

"I didn't go back and interview" the attorneys, said Squier, who authored the commercial. "All we did was go back to the written record of the court," where the attorneys said they had "sought and obtained advice from the attorney general's office."

"I can't quibble with what they the lawyers said to you," said Squier. Assistant attorneys general who field such telephone calls, Squier asserted, should ask "Who are we helping to get out of jail?"

Separately, direct-mail appeals to voters surfaced from the Virginia Young Republican Federation in Richmond and the Fund for a Conservative Majority in Arlington accusing Robb of phony conservatism and linking him with liberal Henry E. Howell, a former lieutenant governor.

The Federation letter begins with an imaginary headline, "Union Gunmen Kill Five in Virginia Coal Dispute," then relates "that could be the headline in your paper if Chuck Robb is elected governor." The letter concludes, "Chuck Robb is a big spending, Great Society liberal . . . just like Henry Howell."

Officials for the Fund, the nation's third largest independent campaign finance group, have pledged to spend at least $100,000 on Coleman's behalf. Their letters, mailed under the letterhead "Virginians for Reagan and Coleman," contend a Coleman loss would be "a personal humiliation for President Reagan."They also assert Robb has received "major financial support from Mrs. Lyndon Johnson and her liberal clique."

To counter the attack from the right, one of Robb's foremost conservative supporters, former House Appropriations Chairman W. Roy Smith, issued a statement yesterday denouncing the letters as an effort to "frighten . . . confuse and mislead Virginia's voters." Smith said the letters were full of "misstatements, distortions of fact, unsubstantiated charges and inflammatory innuendo" and he called upon the Coleman campaign to repudiate them.