It is used to emphasize that something is the only thing or the sole factor involved.
Here are some examples:
* Solamente quiero comer pizza. (I only want to eat pizza.)
* Voy al supermercado solamente por leche. (I'm going to the supermarket just for milk.)
* Él solamente tiene un amigo. (He only has one friend.)