The victim of the assault was the Pennsylvania head of American Atheists, which explains the visual insult being hurled at Islam (and Catholicism), but under the First Amendment there is a right to insult others, even stupidly, something Judge Martin apparently doesn't think applies to Islam. Al Stefanelli of American Atheists supplies some further details:

The defendant is an immigrant and claims he did not know his actions were illegal, or that it was legal in this country to represent Muhammad in any form. To add insult to injury, he also testified that his 9 year old son was present, and the man said he felt he needed to show his young son that he was willing to fight for his Prophet. (snip)

The Judge not only ruled in favor of the defendant, but called Mr. Perce a name and told him that if he were in a Muslim country, he'd be put to death. Judge Martin's comments included,

"Having had the benefit of having spent over 2 and a half years in predominantly Muslim countries I think I know a little bit about the faith of Islam. In fact I have a copy of the Koran here and I challenge you sir to show me where it says in the Koran that Mohammad arose and walked among the dead. I think you misinterpreted things. Before you start mocking someone else's religion you may want to find out a little bit more about it it makes you look like a dufus and Mr. (Defendant) is correct. In many Arabic speaking countries something like this is definitely against the law there. In their society in fact it can be punishable by death and it frequently is in their society.

Judge Martin then offered a lesson in Islam, stating,

"Islam is not just a religion, it's their culture, their culture. It's their very essence their very being. They pray five times a day towards Mecca to be a good Muslim, before you die you have to make a pilgrimage to Mecca unless you are otherwise told you can not because you are too ill too elderly, whatever but you must make the attempt. Their greetings wa-laikum as-Salâm (is answered by voice) may god be with you. Whenever, it's very common when speaking to each other it's very common for them to say uh this will happen it's it they are so immersed in it.

Judge Martin further complicates the issue by not only abrogating the First Amendment, but completely misunderstanding it when he said,

"Then what you have done is you have completely trashed their essence, their being. They find it very very very offensive. I'm a Muslim, I find it offensive. But you have that right, but you're way outside your boundaries or first amendment rights. This is what, and I said I spent about 7 and a half years living in other countries. when we go to other countries it's not uncommon for people to refer to us as ugly Americans this is why we are referred to as ugly Americans, because we are so concerned about our own rights we don't care about other people's rights as long as we get our say but we don't care about the other people's say"

But wait, it gets worse. The Judge refused to allow the video into evidence, and then said,

"All that aside I've got here basically.. I don't want to say he said she said but I've got two sides of the story that are in conflict with each other."

And,

"The preponderance of, excuse me, the burden of proof... "

And,

"...he has not proven to me beyond a reasonable doubt that this defendant is guilty of harassment, therefore I am going to dismiss the charge"