Scientists study volcanic rocks to gain insights into Earth's geological past, including the history of volcanic activity and the movement of tectonic plates. By analyzing the composition and age of these rocks, researchers can reconstruct past environments and predict future volcanic activity.