Most likely the transistor can't sink enough current to turn on the relay. Look up how much current the relay needs with 12 V applied. Divide that by the minimum guaranteed gain of the transistor. That tells you how much base current you need. If that is more than your digital output can source, then you need more amplification in there somewhere. If the digital output can source the minimum required base current, then size the base resistor accordingly.
Figure 700 mV B-E drop in the transistor. If the digital output drives to 5 V when high, then that leaves 4.3 V across the base resistor. (4.3 V)/(14 kΩ) = 300 µA. If the transistor gain is 50, for example, then that can only support 15 mA of relay current.
Most likely your digital output can source at least 5-10 mA. A few mA base current should be possible, which should be able to support the coil current of a modest relay.