If the center leg is positive, connect it to +5V. Then if you know the forward voltages for each color, calculate the necessary resistors using Ohm's Law:
R = (U - Uf) / I
Here U = 5V, Uf = ...datasheet or measured..., I = 0.02A
In case you can't get hold of the Uf values, take 1.8V for RED and about 2.6V for GREEN. This would give you values of about 160Ohms for RED and about 120Ohms for GREEN. In case of doubt, take the next larger value for R. If you don't want to do any math at all, start with a large value, maybe 270Ohms.
Connect (1) and (2) to two digital pins of your arduino board. When you set the pins to HIGH, the LEDs will be off (both sides 5V, no current going through), when you set them to LOW (GND) they will light up.