All bunk beds should have rails for the top bunk. Without question, the number one cause of bunk bed related injuries stems from children falling out of the top bunk. A quality bunk bed will never lack rails for a bed so high off the floor. Additionally, parents should always make sure the rails are tight and secure after the bunk bed has been purchased or assembled.
Ladder placement is important. Ladders will either be on the sides or front of the bed. A good rule of thumb to follow is that bunk beds with four feet or four posts touching the ground should have the ladder in front; meaning on the long side of the bed that usually faces out from the wall (provided the bed is set against a wall). You should only see ladders on the short "ends" of the bunk bed if the bed has a solid foundation on both ends, meaning wood or metal all the way across the end that touches the floor. The reason for this is that front side ladders are at an angle while end ladders are straight up and down. If your child slips on a front sided ladder, which is always angled, he or she will not fall straight down, eliminating the possibility of landing on the bottom bunk rails or getting an appendage caught in the bed. This can happen with a vertical ladder, which is why they should only be placed on the ends of beds, preferably with "walled" or "semi-walled" ends that go all the way to the floor. This will prevent your child from getting an appendage caught on the bed should he or she fall on a vertical ladder.
Bunk bed construction, as one might imagine, is also very important. Wood has substantially less compression strength than metal, so while wooden bunk beds are certainly fine, be wary of those that don't weigh much more than their metal counterparts. Wood bunk beds are just as good as metal bunk beds, but should weigh considerably more.
Being an educated consumer will allow you to get the bunk bed you want while making sure that your children's safety needs are met.