The quickest way I've found to do this is to use the transform panel in the properties shelf of the 3D viewport. The way I do it is to select both vertices of the edge in mesh 1, go to the transform panel, and (in this case) copy the x value [circled in the image below] (either using CTRL-C, or using the dead-tree method).

The x value will be the median value for the x values of the vertices. Then, deselect the vertices in mesh 1, select all of the vertices in mesh 2, and paste the x value from the vertices in mesh 1 into the x value in mesh 2, or if you used the dead-tree method, click on the x value box and enter the value manually.

This moves mesh 2 to the new median point.

To apply the technique more generally, a bit more math may be necessary. Suppose that it was desirable to snap the objects so that the right edge of mesh 1 was aligned with the left edge of mesh 2, or that either or both of the meshes were not symmetrical. In this case, one would find the median value of the desired snapping point in mesh 1 as above. Then the median value of the same coordinate of the part of mesh 2 that was to be aligned with the part of mesh 1 would be determined by selecting the appropriate number of vertices. Then determine the offset by subtracting the value of the snapping point in mesh 1 from the snapping point in mesh 2, select all of the vertices in mesh 2, and subtract the offset from that median value. Since Blender supports regular expressions in the co-ordinate boxes, this can be done directly in Blender, at least for simpler meshes.
The same general technique will work to align objects (in object mode), though the operations are a bit more constrained as only the object center values can be manipulated using these techniques.