The video which Mr Sokolovsky posted in August 2016 has been viewed more than 1.6 million times on YouTube.
He has pleaded not guilty in the case which has been compared to that of the Pussy Riot punk art group, whose 2012 "punk prayer" in a Moscow cathedral led to two-year prison terms.
"I didn't aim to offend anyone," Mr Sokolovsky said in court in a video broadcast by Life News, adding that he was ready to apologise if anyone was offended.
He said he created the videos "with critical and polemical aims", describing himself as an atheist.
The Russian Orthodox Church has accused him of blasphemy over the stunt in a church built on the spot where the Bolsheviks shot Russia's last Tsar (ruler) and his family in 1918.
"Who is the Russian Orthodox Church that I have to publicly repent in front of them?," he added.
Mr Sokolovsky spent several months in prison ahead of the trial, though he is now under house arrest.
Amnesty International has condemned the charges against him as "farcical" and called him a prisoner of conscience.
He also faces a separate charge of illegally possessing a "spy pen" with a recording function, which was found in a search of his flat. In court, he said that the pen is widely available to buy and unsuitable for covert recording.