I just came back from Iran and the short answer is YES. Yes, it safe to travel in Iran. None of my friends who traveled to Iran in the last couple years or other tourists I met in Iran had any troubles there.
Only "problems" are when you are sitting at home and watching news on TV. "Iran is evil" – all you can hear on TV. A long time ago I learned don't trust news as nowadays journalists are looking just for sensations, accidents or conflicts. I spend two perfect weeks in Iran disconnected from mass media. Just I came back, switched on news and it was again the same – Iran did that or that. Hmm… It seems I visited totally different country.
It was no surprise my family and some friends where asking me: "Iran? Why Iran?" when I told about my plans. I knew people who already have been there, I knew some Iranians and I couldn't find any reason which could prevent me to visit that country.
I was thinking about Iran for long time. Two years ago I won Lonely Planet travel guide giveaway on Fresh Roads blog. I could choose any LP guide available at the time. I picked "Iran". Two years later I visited it at last.
What can I tell? It was no any issues with safety. In any hotel or hostel you can find similar advice like this from on hotel in Tehran:
2. Nobody is allowed to search you and inspect your private things. Only the Police (with uniform and the police car) presenting the valid ID can check your ID or ask for it.
3. Leave your passport and valuables in the hotel safe. Do not leave valuables in the room. Do not carry large sums of money; carry only what you need. Check your belongings regularly.
4. for traveling in the city a copy of passport and a hotel card would be enough for presentation to the police or when necessary.
5. Always carry with you card information of your staying hotel. In case of any problems the police can help you to your hotel.
6. Avoid connecting strangers. For visiting places or strolling in the town, ask your hotel desk for help or guidance.
7. Both for inner city and country roads, use authorized transportation. When possible let the hotel desk clerks make these arrangements for you.
But all these are just common sense things you use in any country you travel. It just shows there is nothing special about security in Iran.
Most people I met were very friendly and helpful thought a lot of them don't speak English, but still they will try to help you if you are asking for direction or looking for something. Of course there are taxi drivers who wants to charge you double price comparing to locals, but it is nothing to do with your safety.
I wasn't worry about safety before my trip and I will tell "yes" even with more confidence now if somebody will ask me "Is it safe to travel in Iran?"