The easiest method is to just drop your saturation to zero. That leeches all the color out of the image. It may not be the effect that you're looking for, however.
Another method is to add the results of different color channels in various combinations to one another to make a single intensity value at each pixel location.
So, say, for instance, you could do this:
R + G + B = I
Where R is the red intensity at a given location, G is green, B is blue, and I is your final intensity.
You can then weight them:
Rr1 + Gg1 + b*b1 = I
Where those r1, g1, and b1 are constants for each channel.
You can also transform them, by, say, applying a histogram equalization to each channel prior to combination:
T1(R)*r1 + T2(G)*g1 + T3(B)*b1 = I
Where your T1 is a transfer function (mapping of one set of pixel values into another). Simple transfer functions are things like histogram equalizations, contrast adjustments, and other single-pixel modifications.
This is all from a mathematics perspective, ie, you're doing modifications in a program or in something like Matlab. You can also see how the transfer functions could get increasingly complex, combining neighborhood information and the like.
If you don't want to go that route (and I don't, not often, anyway), there are off the shelf solutions, in Lightroom or Nik. Here's a good review article on the last two, and this article and this article are also good primers.