Is nodal analysis should be applied only when circuit containing current sources..? Or otherwise we have to use source transformation.. When any voltage source is present in the circuit..?
As strictly defined, nodal analysis is not able to solve a circuit containing an independent voltage source (or any other element that does not have an "admittance representation"), because it depends on each branch current being able to be expressed as a function of the node voltages.
There is an extended version called modified nodal analysis that is able to solve circuits with voltage sources. Rather than use source transformations, this method uses the supernode concept to eliminate a problematic branch from the nodal analysis and introduce its effect through a supernode equation.
(Modified) nodal analysis is studied mainly because it's the method used in SPICE and other circuit simulators. Of course it's also good to have a well-defined method for solving arbitrary circuits by pencil & paper, but normally we us ad hoc methods for those problems to minimize the amount of algebra required.