Substitutions, particularly for powers, radicals and denominators, have always been "somewhat challenging."
See if this will help.
will not substitute
will correctly substitute.
Or try this
In:= sol = V[x] /. DSolve[V''[x] + V[x]/(L c) == Es/(L c), V[x], x][]
Out= Es + C Cos[x/(Sqrt[c] Sqrt[L])] + C Sin[x/(Sqrt[c] Sqrt[L])]
In:= sol = sol/.x*Power[c_,Rational[-1,2]]*Power[L_,Rational[-1,2]]->x/w
Out= Es + C Cos[x/w] + C Sin[x/w]
Now use http://en.wikipedia.org/wiki/List_of _trigonometric _identities#Linear_combinations
In:= sol = sol /. a_*Sin[q_] + b_*Cos[q_] -> Sqrt[a^2 + b^2] Sin[q + ArcSin[b/Sqrt[a^2 + b^2]]]
Out= Es + Sqrt[C^2 + C^2] Sin[x/w + ArcSin[C/Sqrt[C^2 + C^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 and C 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.