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: 
"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.
''Con gli amici'' sounds much better than ''con amici.''

You can also use ''alcuni''... both ''degli'' and ''alcuni'' mean ''some'', whereas ''gli'' means ''the'' [in English wouldn't be OK, but in Italian is fine.]