If there is just one voltage source, it is easy to choose one of its nodes (usualy the negative terminal) as the reference node. For an example, check out this:
http://circuits.solved-problems.com/resistive-circuits/problem-1-11-solving-circuit-nodes-nodal-analysis/
If there are more than one...