My arduino UNO can provide max 40mA and 5V and what i need to control is 2.2V 60mA. I will use 4 shift registers (74hc595) connected to arduino and each shift register output will have a transistor attached, which will control 3 LEDs (2.2v, 20mA each) in parallel. The power source will be of 3V (two AA batteries in series) Will this (http://www.taydaelectronics.com/2n3904-npn-general-propose-transistor.html) work? If yes, what resistor should I use with the transistor? Moreover, will this configuration work?
The transistor should work OK - at 50mA current the spec says it's current-gain will be about 30 so plan on maybe 15. This determines the resistor you must have in series with the base. The UNO's o/p is 5V (see final paragraph in case it is 3V) and the transistor needs 0.7V (approx) at 4mA drive. This means that the 5V o/p gets reduced to 0.7V through the resistor which takes 4mA - the resistor value is therefore 4.3V/4mA = 1kohm to consistently drive the base and get 60mA through the LEDs.
Next you need to limit the current taken by the LEDs to 60mA BUT, be aware that connecting LEDs in parallel with a common current limiting resistor may not be the best bet. Reason: One LED will hog the current so it is best to have a resistor in series with each LED controlling the current to 20mA each. The LEDs need 2.2V and the battery produces 3V so the volts dropped across each resistor is 0.8V. The current is 20mA so the resistance is 40ohms - use a 39 ohms resistor in series with each LED.
Going back to your original question, you specify the UNO can deliver 5V - if the UNO is run from 3V then the base resistor for each transistor needs to be reduced to 2.4V/4mA which sounds to me like a 560R or 680R - my calculator is at work so I'm sure you can do the math.
One suggested option that involves no code or design changes, no transistors, and just one resistance calculation:
Replace the 74HC595 in your design with Texas Instruments TPIC6C595 shift registers instead. These are higher current versions of the 74HC595, supporting up to 100 mA per output pin. They use power DMOS transistors for the output stage, instead of low current elements.
The same family also offers TPIC6A595 for 350 mA per channel, and there may be similar power logic shift registers from other manufacturers as well.
All you need to do then is add a resistor in series with each LED, computed in value to limit the current to what your LED requires.
See Correct formula for LED current-limiting resistor? or How do I calculate the resistor value for a simple LED circuit? on this site, for calculating a suitable resistance.
See Why exactly can't a single resistor be used for many parallel LEDs? for an explanation of why wiring the LEDs in parallel without separate resistors is a bad idea.