Provided a DSLR has both i.e. a viewfinder as well as a liveview feature. Which one is more preferable for focusing and composition, and why?
Is there something which can be done through a viewfinder but not through a liveview or the vice versa?
It would depend on the specific camera, but in many cameras Live View will show 100% coverage (the final image will be the same as what you see in the LCD) where the viewfinder may only be 95% (true on certain Nikon models at least).
Live View uses a different autofocus mechanism, which seems slower to me, but is said to be more accurate. It is often used to focus in landscape and macro photography, and has the advantage that you can even zoom in on your subject to check focus more accurately.
Live View has a distinct advantage in low light where the image on the LCD will be brightened so it is easier to see your subject and compose, whereas the viewfinder will become dim as the light fades.
Live View will be a drain on the battery.
When I want to have the fastest responsiveness, I use the viewfinder.
When making careful compositions where I'm using a tripod and have the luxury of time, I prefer using live view in combination with a loupe. I use the Hoodman Hoodloupe:
I agree on the point AmishaKaul brings up about stability. You may have to increase shutter speed or stop down one or two levels to compensate for some increased movement. If your lighting and depth of field can be obtained using a relatively fast shutter speed or smaller aperture then Live View does offer advantages previously pointed out.
You also need to consider the impact on viewing the LCD if the sun is behind you in some shots. It may wash out the display. While you can block it with your hand, that means you are holding the camera with one hand and lose more stability. You also want to cover the viewfinder opening so extra light does not impact the picture.
Bottom line for me is I like Live View over the Viewfinder when I have camera on a tripod. I don't need to worry about stability and have options for blocking reflections on the LCD.
Just my thoughts