Tracking dyes are used in gel electrophoresis to monitor the progress of DNA, RNA, or protein samples as they migrate through the gel. These dyes do not bind to the samples but move at a predictable rate, allowing researchers to estimate the size of the molecules based on their migration distance.