Why led be is dimmer in pin 2 than in pin 13 ?

Maybe, but maybe something wrong with your code or set-up. Can you share the code and at least a picture?