Hi rohansinha2000,
You have used BC557 which is a PNP transistor, so I infer you have used common anode displays.
Assume you need to display '3' . What you provide at the common anode through the transistor is 12V. You supply 0V at the cathode pins of the segments you need to turn ON, here the pins are: A,B,C,D & E. Fine upto here.
Now think about the segments you tried to turn OFF. Since you are connecting the cathodes to a microcontroller, you put a logic high on those pins which corresponds to 5V. Now what you have done is that the common anode of the leds is connected to 12V and the cathodes(of leds which you wish to be OFF) to 5V. Effectively, the leds turn on at the difference voltage of 7V (12-5=7V). So they turn ON dim.
Again, another problem you may face is that, you won't be able to turn off the transistor with the microcontroller. The base-emitter junction would always be forward biased whatever you put at the microcontroller pin, bcoz of same reason stated above.
To solve the problem:
1) Use an NPN transistor and common cathode displays.
2) Provide 5V supply to the displays if possible (preferred solution)
3) Go for a two transistor circuit involving an NPN transistor as first stage switching the PNP in the second stage
4) Use ULN2803 in between display and microcontoller, with supply voltage of 12V for ULN2803.