The gravitational pull of the Sun and the Moon produces the tides, so it makes sense gravity could affect plate tectonics and potentially trigger earthquakes. In a solar eclipse, the Earth, Sun, and Moon are aligned, so you’d expect the effect to be greatest. Is there a correlation between eclipses and earthquakes? The short answer is yes, but it’s not really the eclipse that increases the probability, but the lunar phase.
According to the U.S Geological Survey (USGS), recent studies have indicated a correlation between high ocean tides and earth tides and earthquakes on shallow thrust faults and undersea subduction zones. In an earth tide or body tide, the Earth’s surface is displaced by the gravity of the Sun and Moon. An ocean tide works the same way, except it’s water that moves rather than land. Both types of high tides occur during the full and new moon. A lunar eclipse occurs during a full moon while a solar eclipses occurs during the new moon, but there is no statistical increase in seismic activity compared with any other new or full moon. If you stop to think about it, the alignment between the Earth, Sun, and Moon has to be very precise to produce an eclipse, but the bodies come close to that alignment relatively often.
During earth tides, the surface of the crust may rise or fall by a few centimeters. The affect of ocean tides is more pronounced. Ocean tides can change the sea level by over a meter, which changes the pressure on subduction zones and the faults near the edges of continents.
How significant is the increased risk? The USGS calculation estimates a 3x increased risk of an earthquake. While this may seem like a lot, the risk at any given time is extremely low, so multiplying it by three still yields an extremely tiny probability of an occurrence.
The semi-diurnal tides also have an affect on seismic activity and have been connected with aftershocks in volcanic regions. Even so, the chance of an earthquake occurring is the same whether it is day or night in the region.