Measure from the top of the base of the top bunk bed down to the floor. Consider the old saying, "Measure twice, cut once." Measure it again. This is how long the sides of your ladder will need to be. Saw two of the 2-by-4 pieces to this length.
Cut five 1-1/2 foot pieces from the third 2-by-4. These will be the rungs of the ladder.
Bolt the rungs to the two side pieces you cut in Step 1. These should be spaced 10 to 12 inches apart vertically. The fifth piece should be nailed even with the top of the ladder posts.
Check to see if your ladder is going to be the right height when attached to the top base board. If it needs adjusting to a shorter length, do it now. If it's too short, go back to Step 1 and start again.
Draw a round arc at the top of the ladder sides. Saw on your arced line in order to take the rough edges off of the top sides.
Sand your entire ladder to prepare for Step 7.
Stain and varnish your completed ladder. Allow to dry.
Nail your ladder to the top base board of the top bunk bed. Your ladder should also touch the ground, to provide it with more stability.