Your 7+ year old child at this stage has a great urge to fit into his peer group. Children this age are able to find a circle of friends with common interests and thinking and are able to form a peer group. They take pride in the fact that they are a part of the group and are willing to adapt and adjust to remain in the group.
What you need to know
To this effect children often get influenced by peer pressure which can have both positive and negative effects on the children. The peer pressure will keep increasing as your child grows older but the initiation of the phase starts in the middle years.
Parents worry that if the peer group is not good then children can get a negative influence from them. At this age children want acceptance and therefore make certain choices which might be against the values taught at home. As parents it is your responsibility to monitor the peer group and encourage only positive aspects from the group.
What you need to do
It is true that children at this age spend more time with their friends than with their parents so it is only natural that children start imitating their friends. Your child right now is testing the waters and gets angry if you say anything against their friends. Be assured that as parents if you continuously reinforce good values at home then even if your child seems to be influenced by the peer group right now, over time they will form their own set of values. Those values will be a mix of the leanings that they had from the peer group and your teachings at home.