8 channel quiz buzzer circuit using 8051 microcontroller
The 8051 and clones typically use an I/O configuration that is described as "pseudo-bidirectional". They have active pull-down but quasi-passive pull-up (there's a transistor that is turned on briefly to improve the rise time). This means that they can only source a tiny amount of continuous current to an external device. The datasheet (DC Characteristics, page 10) shows that VOH drops to 2.4V at just 60 &micro;A of current.

This is not enough current to drive your NPN transistor. Instead, try putting a logic-level N-channel MOSFET there.



Note also that your other NPN (the one attached to pin 17 &mdash; you really do need to use reference designators in your schematics!) should actually be a PNP. This requires inverting the logic in your code that drives pin 17.