On this page it says that I have to use Unity 5.6 beta in order to build daydream apps, but I;m using Unity 5.4 daydream preview. Do I need to use 5.6 if I want to publish my game or is it fine to stay with 5.4 daydream preview? Are there any advantages of using 5.6?
While you may be able to get away with the 5.4 TP, know that it is not under active support. All work has moved to the Beta release and all support will be there now and in the future.
One more thing: if I have to update sdk as well is it better to do it before or after updating unity?
We've had to stick with the tech preview because switching to 5.6 (even beta 10) leads to a significant performance drop and also jittering of the camera. I'll be filing a bug report soon to try to help get these issues on the radar, but it seems unlikely that 5.6 will be fixed in time if you're publishing soon.