The U.N. General Assembly's human rights committee also noted Iran's discrimination against religious minorities, in particular "the unabated pattern of persecution" against the Bahai community, including executions.
The resolution called on the Iranian government to ensure that capital punishment is only imposed for the most serious crimes, and also called for religious tolerance.
The vote for the resolution was 63-35, with 60 abstentions. The United States voted for it, and most Middle East countries abstained or voted against. The resolution, which is not legally binding, now goes to the full General Assembly for a vote.
Iran's moderate President Mohammad Khatami has talked of strengthening freedom of expression and creating a "civil society."
But Maurice Copithorne, the U.N. special representative on the situation of human rights in Iran, told the committee earlier this month there have been worrying signs that conditions were slipping backward.
He said reformers, political dissidents and commentators were detained under unacceptable circumstances, and in some cases the individuals have disappeared.
The resolution also expressed concern at the arbitrary closure of some publications and persecution of writers and journalists.