Substitutions, particularly for powers, radicals and denominators, have always been "somewhat challenging."
See if this will help.
This
x/(Sqrt[c]Sqrt[L])/.Sqrt[L]Sqrt[c]->1/w
will not substitute
while this
x/(Sqrt[c]Sqrt[L])/. 1/Sqrt[L]*1/Sqrt[c]->1/w
will correctly substitute.
Or try this
In[1]:= sol = V[x] /. DSolve[V''[x] + V[x]/(L c) == Es/(L c), V[x], x][[1]]
Out[1]= Es + C[1] Cos[x/(Sqrt[c] Sqrt[L])] + C[2] Sin[x/(Sqrt[c] Sqrt[L])]
In[2]:= sol = sol/.x*Power[c_,Rational[-1,2]]*Power[L_,Rational[-1,2]]->x/w
Out[2]= Es + C[1] Cos[x/w] + C[2] Sin[x/w]
Now use http://en.wikipedia.org/wiki/List_of _trigonometric _identities#Linear_combinations
In[3]:= sol = sol /. a_*Sin[q_] + b_*Cos[q_] -> Sqrt[a^2 + b^2] Sin[q + ArcSin[b/Sqrt[a^2 + b^2]]]
Out[3]= Es + Sqrt[C[1]^2 + C[2]^2] Sin[x/w + ArcSin[C[1]/Sqrt[C[1]^2 + C[2]^2]]]
Note that I have used c instead of C because C has a defined meaning to Mathematica and that isn't the size of a capacitor.
When you can't get a replacement pattern to work the advice is always to use FullForm to see what the internal Mathematica form is for the expression and then use that literally in your replacement pattern. Sometimes you can use something less detailed than that and still have it work, but that is always a good first step to try. Also be very careful to include a space between /. and 1 if you do anything like expr/. 1/w so that it does not interpret .1 as decimal one-tenth.
Also watch out for the domain information given on that wiki page for the trig substitution to make sure that I haven't chosen the wrong replacement. If there were a single Mathematica command that would do that subsitution and automatically take into account the signs that would be great, but I am not aware of something that will do that.
If you can give some initial conditions to DSolve then it may automatically replace C[1] and C[2] with the appropriate values.
Note to staff. It would be really really really nice if <ctrl>v would correctly paste inside a code box someday. <ctrl>v woks fine for an initial paste into a code box, but any subsequent attempt to highlight part of that box and paste a replacement doesn't paste. Being able to make simple edits like that would be very helpful and far less error prone than just "typing it all back in again." Thank you.