Resistors in this context are used to provide a predictable current. The current thru a resistor is known if the voltage accross the resistor and the resistance are known. The relationship between these three is called Ohm's law.
The input of your solid state relay is most likely a LED. You didn't provide a link to the datasheet, so I didn't look it up. The datasheet will also tell you the current it needs, but let's assume 10mA now for sake of example. A good drive circuit for this case is:
When the digital output is low, the transistor will be off, no current will flow thru it, and the relay will be off. When the base of Q1 is driven to 2.3V when the digital output is high, the emitter will be one B-E drop less. Let's say the B-E drop is 700mV, so the emitter voltage will be 1.6V. That is also the voltage accross the resistor. By Ohm's law we know the current thru the resistor will be 1.6V / 160Ω = 10mA. Due to the transistor's gain, most of this will come thru the collector, which means thru the relay input. This circuit is essentially a switchable fixed 10mA current sink.
The collector voltage of the transistor will be whatever it needs to be to maintain that 10mA current, as long as that is within the range it can manage. The collector can go a little lower than the base voltage and up to the supply voltage. For simplicity, let's say it's lower limit is the base voltage of 2.3V when on, which leaves up to 3.7V that the circuit can apply to the relay. You say the relay drops 3V when on, so that all sounds fine.