Yes, there is a relationship, but not all earthquakes are associated with mountains and not all mountains result from the processes that cause mountain building. Firstly, what causes earthquakes? read more
There is also a link between volcanic mountains and earthquakes, but it is different. The movement of magma in the crust causes harmonic tremors when the magma is moving. There are also small seismic quakes that can occur just before or during the eruption. read more
Our geodetic measurements have helped quantify the role of both seismic and aseismic deformation processes in mountain building. read more
Finally, at conservative boundaries the plates slide past each other, but the “edges” of the plates are very jagged and rough so there is a lot of friction and the movement is jerky, so we have lots of earthquakes (one example is the San Andreas Fault in California). read more