A very common question that arises in custody litigation is whether it is illegal for a brother and sister to share a bedroom. The short answer is: No. It is not illegal in any state for opposite-sex siblings to share a bedroom. That is true for children of any age -- infants, young children and teenagers.
There are two contexts in which parents may not allow opposite sex children to share a bedroom:
Foster Parents - Foster parents are normally prohibited from having opposite-sex children share a bedroom during times in which they have a foster child placed in their home. They will have to demonstrate separate sleeping quarters for opposite-sex siblings in order to pass a home study.
Court Orders - If a custody court has ordered that opposite-sex siblings not share a bedroom, the parents are expected to obey the court's order.
Otherwise, parents are not legally restricted from having opposite-sex siblings share a bedroom. However, if a parent has reason to be concerned about the appropriateness of the bedroom sharing arrangement, given the age or behavior of a child or children, the parent should consider the children's safety and best interests when deciding if the arrangement should continue.
Most families occasionally find themselves in situations in which they're sharing bedrooms, be it a single bedroom in a hotel room or a shared sleeping arrangement when visiting a relative's house. Beyond the economic issues, a complete ban on opposite-sex bedroom sharing would make a lot of family vacations considerably more cumbersome and expensive.
In most households, the primary reason why siblings share bedrooms is economic. Their parents can only afford a house or apartment of a certain size, and there aren't enough bedrooms for every child to have a private room. Child custody cases are decided on the best interest of the children, not upon the wealth of the parents. The parents need to provide a safe and appropriate environment for the children, but not one defined by an ideal that is beyond their means.
A court may nonetheless take the children's safety into consideration. If a parent objects to bedroom sharing, the court may take into consideration factors that suggest that a child is endangered by the arrangement. For example, if the child is sharing a bedroom with a sibling or step-sibling with a history of inappropriate sexual behavior with other children, or the children have been caught playing "doctor" with each other, a court could find the continued sharing of a bedroom to be an inappropriate arrangement.
When children are old enough to state a custodial preference, and that preference is submitted to the court, a bedroom sharing arrangement may affect the child's stated preference. That is, although the sharing of a bedroom at a parent's home may not directly impact the custodial arrangement ordered by a court, if a child has strong feelings about the arrangement it might still come into play through the child's preference.