Question: How does adding 'degli' in 2. change the meaning of 1.?

> 
> 1. Sono stato al ristorante con amici.
> 2. Sono stato al ristorante con **degli** amici.
> 
> 
>

Answer: 
In my opinion

> 
> Sono stato al ristorante con amici.
> 
> 
> 

stresses the fact that the people I was with were friends, as opposed to other "categories" such as family members, coworkers and so on.

On the other hand

> 
> Sono stato al ristorante con degli amici.
> 
> 
> 

gives slightly less importance to the kind of people I was with and communicates two facts (*I went to the restaurant* and *I was with friends*) with no focus on a particular one.
"Degli" in this context means "a certain quantity of, some", so the two examples have different meanings:

> 
> 1. I went to the restaurant with friends
> 2. I went to the restaurant with some friends
> 
> 
> 

The change in meaning is analogous as you would have in English.