Rory loses her virginity to Dean at the end of Season 4. The episode where this happens is Season 4, Episode 22, titled "Raincoats and Recipes".