in this context, energy refers to a person's character.
For example, if the person has high and positive energy, it could mean that the person is a very energetic, bubbly, happy and kind person.
If the person has low and negative energy, it could mean the person is constantly gloomy, pessimistic and discouraged.
So the line is telling you that you should be positive and kind so that you also attract positive and kind people to be your friend.