The hair ribbon represents independence and hope.
Maria Teresa wears a hair ribbon to give herself a sense of normality when she's in prison. Before her torture, they were just an accessory. Sor Milagros used them to help her braid her hair at Inmaculada Concepcion. After, they provide her with independence from her captors and hope that things will get better for everyone.
Santiclo, a guard, brings a blue ribbon into the prison that Magdalena uses to tie Maria Teresa's braids as she's nursing her back to health. (He also brings a packet of honeyballs that day.) On the day that she has to testify about the jailer's abuses, she hides two notes in her braid. One was written by Minerva and Sina and is signed The Fourteenth of June Movement. The other is a personal statement about her torture and treatment.
Maria Teresa drops the first one but lets the second one stay in her hair. She says that she isn't sure why; it might be that she saw the ribbon and remembered how Santiclo brought it to her that day. She didn't want him to be hurt and is worried he'll be shot if his testimony is traced to her. After the letter is dropped, the female political prisoners are released.