The song was written specifically for Orange Is the New Black by Regina Spektor, who was approached by the show's creator, Jenji Kohan.
Kohan gave Spektor access to watch rough edits of the episodes while the first season was still in production.