Joseph Michael Schreiber faces at least 30 years in prison if convicted on charges of arson with a hate crime enhancement, said authorities.
The suspect allegedly made multiple anti-Muslim posts on social media.
The Islamic Center of Fort Pierce was heavily damaged in the fire, which was set on the anniversary of 9/11.
Omar Mateen, who occasionally went to the mosque, shot dead 49 people in Pulse nightclub in June before being killed.
He professed allegiance to the Islamic State group.
On Wednesday evening, St Lucie County Sheriff's Office said Mr Schreiber owns a motorcycle consistent with one shown on surveillance video footage outside the mosque on the night of the fire.
"Other evidence collected also linked Schreiber to the arson," Maj David Thompson told a news conference.
Schreiber has made a number of comments against Islam on what appears to be his Facebook page.
One post said: "ALL ISLAM IS RADICAL , and should be considered TERRORIST AND CRIMANALS and all hoo participate in such activity should be found guilty of WAR CRIM".
Mr Schreiber was previously sentenced twice to state prison for theft, according to the Florida Department of Corrections records.
He served his first term from 2008-09 and his second stretch from 2010-14.
No one was injured in the weekend's blaze, which coincided with the Muslim holiday Eid al-Adha.
The FBI and the Federal Bureau of Alcohol, Tobacco, Firearms and Explosives joined the investigation.
The blaze has left the mosque's members "saddened and scared", said assistant imam Hamaad Rahman.
In addition to Mateen, the mosque was also visited by Moner Mohammad Abu Salha, who became the first American to commit a suicide bombing attack in Syria.

Yanic Wildschut put the Latics in front but the U's levelled shortly after through Alex Gilbey's 25-yard strike.
Wigan swiftly restored their lead with Ryan Colclough's calm finish, but Colchester negated the winger's effort with Elliot Lee's curling shot.
George Moncur converted a penalty after he was fouled to make it 3-2, but Grigg's injury-time goal earned a draw.
Wigan manager Gary Caldwell told BBC Radio Manchester:
Media playback is not supported on this device
"That wasn't good enough. When you squander as many chances as we did then you have to be aware that the opposition are going to come back into the game.
"Second half the performance was nowhere near what we expect. I warned the players that you show your superiority on the scoreboard.
"We'll have to work hard to put it right next week."

The crash happened at Evanton at about 17:20 on Saturday. The fire service and the air ambulance was sent to the scene.
The occupants of all three vehicles were injured, but the extent of their injuries was not known, police said.
A spokesman added: "Inquiries are ongoing into this matter and no further witnesses are sought at this time."
A 32-year-old man has been arrested over last Sunday's fire attack on a Florida mosque, which was attended by the Orlando nightclub gunman.
[NEXT_CONCEPT]
Will Grigg's late strike secured a point for Wigan at bottom club Colchester in a thrilling encounter.
[NEXT_CONCEPT]
Several people have been injured in a three-car collision on the A9 near Dingwall in the Highlands.