Sen. Roberto Arango, a Republican who represents the capital of San Juan for the island's governing party, presented his letter of resignation after a weekend meeting, Senate President Thomas Rivera Schatz said.
Schatz did not release the lawmaker's letter, but said the circumstances that led to the resignation "are very lamentable."
Local news media published photos from the application showing a man's nude upper body with a cell phone obscuring his face. Another photo showed a rear view of a nude man on his hands and knees. Another showed a fuzzy image of a face that seemed to match Arango's.
Arango has neither confirmed nor denied suggestions by local media that the photos might be of him and apparently was not asked if he had posted them. During a recent interview with WAPA TV in Puerto Rico, the senator said he has taken pictures of himself with a cell phone to document his recent weight loss.
"I really don't remember having taken those pictures of myself, but it doesn't mean I didn't take them," he told the station. "I really don't remember."
Arango did not return calls Sunday.
A graduate of Louisiana State University and a food importer before turning to politics, he was chairman of a business council for the national Republican Party and municipal director of the Republican Party in Puerto Rico, according to his Web page for Puerto Rico's Senate.
Pedro Julio Serrano, founder of the gay rights group Puerto Rico for Everyone, said Arango voted in favor of Resolution 99, a proposal that would block any attempt to permit same-sex marriages in the U.S. territory. He also helped block a measure to ban sexual discrimination in the workplace and opposed adoption rights for gays.
"This isn't a moment to kick someone when he's down, but I have to denounce Sen. Roberto Arango's complicity with a fundamentalist agenda that promotes the exclusion and marginalization of lesbian, gay, bisexual and transgender people," Serrano said Sunday.
Local news media said that the pictures first appeared on an iPhone application for gays and bisexuals and that they themselves later received copies from unidentified sources.
In recent days, Puerto Rican Gov. Luis Fortuno had said that if the man was indeed a legislator, he should resign. That echoed the sentiments of other lawmakers, including local House Speaker Jenniffer Gonzalez.