In July 1862, US Army General Daniel Butterfield modified an already established bugle call played to notify the troops the end of the day was imminent.  This new call became know as "Taps" shortly after and was played for the first time in its entirety at a military funeral for a Union cannoneer killed in action.  
Click on the link below for the full story of how Taps was originated and became such an integral part of military protocol today: