When did the Church decide that their leaders needed to be celibate?

The Vatican, or Catholic church decided it, most of the rest of Christianity does not follow that. All adult Christians have the right to be abstinent/celibate or get married. Neither should be forced on anyone. The earliest known of prohibition of marriage was around the 4th century. It was in the decree of the council of Elvira.