During the Salem Witch Trials in 1692, it appears as if there were no defense lawyers or witnesses. I'm aware of the existence of petitions for the innocent, but did people in the town ever speak in court for the accused?
During the witch trials, the accused were expected to defend themselves. There were witnesses that would testify against or for individuals facing accusations, mostly making more accusations against a suspect. What is interesting is the tensions created by the entire situation within Salem Village. If you look at Salem Possessed: The Social Origins of Witchcraft by Paul Boyer and Stephen Nissenbaum, they look at the division within the village over the ministry of Rev. Samuel Parris. Parris' supporters, especially the Putnam family, were very involved with the accusations. Ann Putnam Jr., the daughter of the church's clerk Thomas Putnam Jr., was one of the most vocal afflicted girls. This division shaped the sides of who supported and who opposed the trials.
There was support for the victims, more as the trials continued. The Porter family, the political opponents of the Putnam family, started the petition for Rebecca Nurse. This was the first major action against the trials since the previous targets were more 'acceptable' in the Puritan society.
When Nurse was accused, the was support for her. Israel Porter, Elizabeth Porter, Daniel Andrew and Peter Cloyce did give their support to Nures (an online transcript can be found here: http://salem.lib.virginia.edu/texts/tei/swp?term=Rebecca Nurse&div_id=n94.11&chapter_id=n94). Defending an accused suspect was not common since many who showed opposition to the accusations later appeared in court as well, like Sarah Cloyce who walked out of mass during Parris' sermon shorty after her sister Nurse was accused.
If you want more on the legal history you can check The Salem Witchcraft Trials by Peter Charles Hoffer
For more on social history and the politics of Salem Village you can check Boyer and Nissenbaum.
I also run a Facebook page where I post a daily fact about the witch trials, www.facebook.com/salemwitchtrialfacts where I've included information on support for the trials. The current theme I'm posting about this week is the end of the trials and I just spent a few days looking at Rev. Increase Mather's Cases of Conscience which was a major work against the trials that swayed public opinion, and strongly influence Gov. Phips, to help end the trials in Salem.
Most people were afraid to publicly defend an accused because it could shift the attention of the judges toward them. Furthermore during the trials, a mass hysteria was present and many people actually believed in the presence of witches. It is important to remember that the Puritans who lived there held strict religious beliefs regarding heresy and morality. While some may have doubted at first, the initial support of reverend Samuel Parris added a lot of credibility to the accusations.
People of Salem started to become uncomfortable when the village's ex minister George Burroughs got accused and executed. Villagers would whisper among themselves to question the trials but again, the fear of judges would convince most to remain quiet. By early September 1692, the hysteria had mostly faded and people became increasingly worried and angry at the procedures. Between one and two hundreds individuals had either been arrested or executed by then, including highly respected officials.
Several jurors came forward to say that they were "sadly deluded and mistaken" in their judgments and a judge publicly apologized for that he had done. Therefore to answer your question, there was more of a mass protest rather than individual attempts to defend someone during the trials.
SOURCE: "An Account of the Salem Witchcraft Investigations" University of Missouri-Kansas City, School of Law
As others have said, people who knew accused personally did sometimes testify in their defense. Some people also publicly made more general criticisms about the trials.
There was public disagreement over the admissibility of spectral evidence—"victims'" testimony that they had seen the spirits of of accused witches in dreams, etc.—which the Salem trials relied on in an amount that was probably unprecedented.
Assuming spectral evidence was accurate seems to be in tension with Puritan theology: why couldn't the devil mislead victims by showing them innocent people?
There are several examples of people publicly questioning the legitimacy of spectral evidence. In June of 1692, right after Bridget Bishop's execution, the Salem court adjourned for 20 days and asked influential ministers in the area for advice. Their response urged caution:
As in complaints upon witchcrafts, there may be matters of inquiry which do not amount unto matters of presumption, and there may be matters of presumption which yet may not be matters of conviction, so it is necessary, that all proceedings thereabout be managed with an exceeding tenderness towards those that may be complained of, especially if they have been persons formerly of an unblemished reputation.
...
Presumptions whereupon persons may be committed, and, much more, convictions whereupon persons may be condemned as guilty of witchcrafts, ought certainly to be more considerable than barely the accused person's being represented by a specter unto the afflicted; inasmuch as it is an undoubted and notorious thing, that a demon may, by God's permission, appear, even to ill purposes, in the shape of an innocent, yea, and a virtuous man. Nor can we esteem alterations made in the sufferers, by a look or touch of the accused, to be an infallible evidence of guilt, but frequently liable to be abused by the Devil's legerdemains.
Unfortunately, the letter ended with:
Nevertheless, we cannot but humbly recommend unto the government, the speedy and vigorous prosecution of such as have rendered themselves obnoxious, according to the direction given in the laws of God, and the wholesome statutes of the English nation, for the detection of witchcrafts.
which made it significantly less forceful, and the trials continued untempered.
Also in June, Rev. William Milborne, a Boston baptist minster, wrote a petition to the General Assembly contesting the validity of spectral evidence. William Phips, Mass's governor, ordered his arrest.
Robert Pike, assistant to the general court, took dispositions from Susannah Martin and her accusers during the trials. In August he wrote a highly critical letter to Jonathan Corwin, a judge in the trials, where he said that he thought the visions were "more commonly false and delusive than real" and that no one could give true testimony about whether their vision was accurate or not. He was also very skeptical of the fact that during the trials, accusers would scream and fall when the accused would look at them as though they were being hexed:
It is directly contrary to the use of reason, the law of nature, and principles of humanity, to deny it, and plead innocent, when accused of witchcraft, and yet, at the same time, to be acting witchcraft in the sight of all men, when they know their lives lie at stake by doing it. Self-interest teaches every one better.