both are right, depending on what you want to express.
"I like going out with my friends" describes your general feeling about going out with your friends, and it is not likely going to change.
"I like to go out with my friends" on the other hand is a choice you make at that particular time, for example you are doing your home work, but you like to go out with your friends instead.