Tracer bullets are mainly used for training purposes in modern warfare. Because the tracer bullets emit a light, it would be not a good choice to use in warfare if you were trying to avoid detection by enemies.
The light also makes it easier to pinpoint the exact origin of the bullet, magnifying the chance that enemies would discover who fired the weapon. Tracer bullets can also be used to show off military strength and are used sometimes in military parades.