Bleach will kill mold on a surface. The issue is that the surface mold is only part of the problem. If you don't kill the mold in the wood itself, the surface mold will come back. The other issue is that using bleach in an enclosed space will let loose a ton of pretty noxious chemicals.
It's much safer to clean the area with a mixture of about 50-50 water-vinegar. Then I'd go to home depot and get some of the moldproofing spray that they have (I think it's called concrobium or something like that) and spray it on the cleaned areas to lock the mold that's in the wood in place. All of this assumes that you have addressed the issue that led to the mold in the first place . . . which means better air flow, open attic vents, patched any leaks in the roof, and fixed any other areas water could get in. I'd also replace any moldy looking insulation.
Get a decent respirator for this work, and wear long sleeves, pants, gloves, and goggles.