In order to understand why Romeo killed Tybalt, one must first address why Tybalt killed Mercutio.
Mercutio was not supposed to have been slain by Tybalt. Tybalt wanted to avenge himself on Romeo for crashing the Capulet's ball, which Tybalt felt to be an insult. In fact, Tybalt believed that the only reason why Romeo was there was to laugh at Tybalt's family. When Capulet stops Tybalt from fighting Romeo that night, Tybalt feels further insulted and vows to avenge himself, as we see in the lines, "I will withdraw, but this intrusion shall, / Now seeming sweet, convert to bitt'rest gall" (I.v.96-97). Mercutio learned that Tybalt had challenged Romeo to a dual by letter, and, feeling angered by this, followed his impetuous instincts and decided to place himself out on the street so that he could challenge Tybalt himself if he saw him.
Tybalt tries not to engage Mercutio in a fight, even addressing him and Benvolio politely as "gentleman" (III.i.38). But when Romeo tries to back out of Tybalt's challenge, because Mercutio is so angry with Tybalt, Mercutio considers Romeo's actions to be "vile submission!" and challenges Tybalt himself.
Hence, one reason that Romeo kills Tybalt is to avenge his best friend's death. However, the reasons go a bit deeper than that. Romeo, a lot like Mercutio, is also a very rash, emotionally driven, impetuous, and very young man. Tybalt ran away after he stabbed Mercutio. During that moment, Romeo had the opportunity to run from further calamity as well, allowing the Prince's law to punish Tybalt. Instead, due to his rash emotionalism, Romeo decides to break further laws by avenging his best friend's death himself.
Thus, we see that the reason why Romeo killed Tybalt is twofold: 1) He wanted revenge for the murder of his best friend; 2) His rash, emotional, impetuous mentality led him to believe that murdering Tybalt himself was the only way to avenge Mercutio's death.
Because Tybalt killed Mercutio