Bones are kept together in the body by muscles and tendons. Since Brook has none of those, how does he stay together and move? Especially with him being able to open his skull, how does he not fall apart?
According to me his bones are together because of Devil fruit only.
According to this link:
As long as his bones are not hurt any attacks will not go to his core like when Zeo beheaded Brook, his soul managed to repair it and connect his bones together again.
Also, due to the Devil Fruit powers allowing it, Brook also has the ability to store objects in his skull by opening it along its crack. While Brook is able to do these things because of his Devil Fruit supported form
He has also mastered the energy his soul emits to the extent that he can reattach his bones by using this energy such as when he is beheaded he then attaches his head back with the help of it.
So because of his Devil Fruit power he managed to master and realized the true nature of Yomi Yomi no Mi and because of this only he is able to keep his bones together.
Could it be because of his devil fruit? Probably not, as it was simply allowing his soul to enter his body again in order to live a second life. If he managed to find his body sooner he wouldn't be a skeleton (his soul got lost because of the heavy fog and too much time passed before he found his corpse). Funnily, we can wonder what would have happened if he died in an explosion or if his body was dispersed into the sea somehow. It could be argued that the DF remained in his soul and fused with his body again in order to make it hold together.
Can we consider it is his soul which keeps his body together? Edit: found a source in chapter 643 page 8 : http://z.mfcdn.net/store/manga/106/65-643.0/compressed/j008.jpg
==> it is indeed his soul and not his DF which maintains his bones together! So even though his soul can wander outside of his body through out-of-body experiences, it's his soul who maintains everything.