Well if you know the current draw of the device that is to receive the voltage then a simple series resistor can act like a voltage divider. There are other more complex methods such as comparator IC or even op amps. Tell us more about what you are actually trying to interface with.
If you want a variable output from 0v to 5v, then you should go for a DAC (Digital to Analog Converter). If you are simply driving an input that is not 5v tolerant, then you should should a logic translator IC or a simple voltage divider. Hope that helps.