You may approach the subject by speaking with her about the fact that everyone can make mistakes. Explain to her that some mistakes that adults make lead to consequences such as being sent to a place like a time out facility. Find out what her understanding of where he is and then in age related term, speak to her about the nature of the place, the fact that there are other kid's dads there as well and that making a mistake does not translate to being intrinsically bad (people can learn from their mistakes and change over time) Hence, his is using this time to better himself.
If the two of them are able to see one another during visitations and for her to receive mail and send mail/pictures to him, it may make it easier for her to deal with the situation with time rather than be isolated. Both can contribute to each other's life in positive ways (as long as he is not abusive to her and her mother is all right with them keeping in touch) She may ask about what he had done to get the consequence and if she is too young to comprehend you may let her know that a child may not understand it but that she later on can ask him to help her understand when she's older. If the crime was something you can talk about to her without her feeling traumatized then you can outline the basic facts and connect the behavior with being something against the law and remind her that he had made mistake.
You may also let her know that it is normal to miss him and that if she ever wants to tell you about it that you're there to listen.