Yes, they are hikers.
Firstly, their credentials don't exactly scream "military" or "espionage":
Shane Bauer is a freelance photojournalist and journalist who has worked for Pacifica News Service, Mother Jones, The Nation and other left-leaning media outlets, using his fluency in speaking Arabic.
Sarah Shourd worked in education and social justice in Damascus, Syria where she provided educational opportunities to refugees from the war in Iraq and taught English. Shourd was released by Iran on September 14, 2010 on $500,000 bail.
Joshua Fattal is an environmentalist and educator, and had been from January to May 2009 a teaching fellow for the International Honors Program (IHP)'s "Health and Community" study abroad program.
The three were working and living in the middle east, and decided to take a holiday to Iraqi Kurdistan.
“We knew a number of people in Damascus who’d traveled to Iraqi Kurdistan and had a really good time,” said Shon Meckfessel, a friend who accompanied the three on the trip. “We just figured it was a really cool place, and nearby. And it was safe.” They planned their route carefully, Mr. Meckfessel said, deciding to cross into Iraq through Turkey because it seemed safer.
It is also highly likely that they were actually seized in Iraq by Iranian forces that had crossed the border.
That said, a leaked US military report about the event claims that their presence in that region may not have been purely recreational:
The lack of coordination on the part of these hikers, particularly after being forewarned, indicates an intent to agitate and create publicity regarding international policies on Iran. The leadership in Iran benefits as it focuses the Iranian population on a perceived external threat rather than internal dissension. Kurdish leaders remain concerned about international perceptions regarding security as they seek to increase investment in the KRG. Expect KRG leadership to intervene to return the 3 individuals and the Iranian government to accuse them of being spies. Additionally, KRG leadership may impose additional restrictions on private activities near the Iranian border.
(KRG = Kurdish Regional Government)