The vacuum of space probably isn't a problem. A layer of bark with tightly bound dead cells with thick cell walls would resist vacuum well, assuming it could be grown in a relatively uniform exterior layer. It would also be an excellent insulator, which would be a problem, the plant would need some method of shedding heat via radiators. There would be a need for some flex as there would be differential heating on the side exposed to sunlight. As you can read here most bark is designed to regulate tree temp within an atmosphere, using air pockets, shadowy ridges, etc to circulate or trap air as necessary. But if the bark on the space plant is uniform in thickness and relatively smooth it ought to allow for vacuum protection and temperature insulation.
Radiation protection would be another matter. The water content of the inner bark, plus perhaps heavy metals within the cellular structure, would be a good option to block solar radiation. Wood itself doesn't really block radiation, but with a high moisture content, thick enough walls, and perhaps water reservoirs in the wooden hull, it would suffice. You would need several FEET of water depth all around your hull to block a significant percentage of incoming gamma rays (here is a nice technical article about it. Or you could construct a metallic inner hull for the human areas. Of course the tree itself would suffer radiation damage, unless it were grown and then killed, leaving just the wooden frame for the spaceship (which seems to negate the value of a living ship for self repair/additional growth, unless you just didn't have access to other construction materials). What you would need is a protected inner tree that continually regrows the inner and outer bark, which are the areas getting all the radiation damage. Kind of like skin, so long as the bottom cell layer is intact, the outer layers of skin can regenerate and heal quickly. There is a possibility of creating a magnetic shield for the ship, which would eliminate the need for a thick water logged hull, but that would also require a substantial non-organic component to the ship.
There would have to be non-organic parts of the hull for sensors, access, and attachment points for whatever engine you are using. I doubt a tree could withstand much acceleration and the mass for strength ratio would be very unfavorable (especially with all that water) but if you had magic engine thrust tech, it may not matter.
Otherwise a tree would be fine for a ship. Having interior passages and spaces with breathable air wouldn't be an issue, though obviously the living space/tree ratio would be low, much lower than in a conventional ship. But if the tree could handle life support and computational tasks, perhaps even sensory and drive management tasks, you could eliminate a lot of the space needed for equipment in a regular space craft. There could even be a symbiotic relationship with the humans onboard, the tree needs their CO2 and waste, they need the O2 and glucose. Not sure how well photosynthesis would function in a vacuum (regular leaves probably couldn't retain moisture) but that's out of the scope of your question.