4 LEDs in series, each dropping 3 V isn't going to work well with a 12 V source. The LEDs are using up all the voltage, so there is nothing left for a switch to drop or some mechanism to make sure the current is reasonably regulated.
The "12V" battery will vary a bit depending on temperature and state of charge. LEDs have a steep current curve as a function of voltage, so a small change in the battery voltage will cause significant change in LED current.
At most you can run 3 of these LEDs in series from a "12 V" battery. That gives you about 3 V at nominal voltage for whatever regulates the current to drop. Here is a simple circuit for a single string of 3 LEDs controlled from a 5 V digital output:
This sets up Q1 to be a current sink largely independent of the actual battery voltage. You say your LEDs take 250 mW at 3V. That means the current thru them is 83 mA. In this circuit, we're trying to keep the emitter at 1 V, which will cause the right current thru R12, with 98% of that or more going thru the LEDs. The transistor will do this over a wide range of collector voltage, which is how the same current is maintained regardless of battery voltage variations.
R2 and R3 are somewhat of a guess. You probably have to tweak R3 to get the desired LED current. However, once you find the right value with your particular transistor, this should work nicely. The problem is that the base current is high enough to load down the R3/R3 voltage divider, but we can't know what it is up front to trim R3.
Let's say the transistor gain is 50, which is the minimum you should be able to count on. In that case the base current will be 1.7 mA. As a rough start on calculating R3, I used 1.5 mA base current. Figure the B-E drop at 700 mV, so we want to hold the base at 1.7 V. That means 7 mA will flow onto the base node thru R2. With the base taking 1.5 mA, that leaves 5.5 mA for R3 to draw. (1.7 V)/(5.5 mA) = 309 Ω, so 300 Ω is a good value to start at and see where you are. Lower value of R3 will cause lower LED current.
Note that this circuit assumes your digital output can source 7 mA at 5V. Many can, but you should check that.
The point of the above circuit was to drive the maximum number of LEDs from a string and deal with the possibly significant variation of the battery voltage. If you want to give up and just get two LEDs per string as some other answers have done, then this becomes even simpler:
This uses the least parts, draws the least current from the digital output, and still keeps the LED current reasonably constant as the battery votlage varies. Note that R1 needs to be at least a 1/2 Watt resistor.
This uses the same strategy as before, which keeps the base of the transistor at a fixed voltage with a fixed emitter resistor to create a current sink that is largely independent of the battery voltage. With only two LEDs to drive, we have enough voltage for the transistor to drop so that the base can be held at 5 V. Unlike with a brute force common emitter switch, the current drawn from the digital output will be the LED current divided by the transistor gain, not some artifically lowered "forced gain", in addition to this actively regulates the LED current as noted before. Figuring you can count on the transistor having a gain of 50 at least, this draws less than 2 mA from the digital output.
Replicate for each pair of LEDs you want to drive.