This actually comes from the idea that a person owns their own thoughts and ability to reason and since they own those things exclusively it means that no other person can hijack them which means that the most basic part of us is unownable by another person. This makes it impossible for one person to control another thus 'all men are created equal' simply because we all have the same right to reason out our existence as anyone else. This creates a natural state of equality between people but since this ability was somehow created by whatever force actually made it possible to reason it means that all men are created equal by that force. It can be God or Mother nature but the point is what makes us all equal is our exclusive right to our own thinking process. This was either given to us by God, if you believe in creationism, or by nature if you believe in other things but no matter what we are all created equal because of this. This was the genius of Locke where he invented the idea of reason and tied it to a political philosophy. BTW, have you notice how often the word 'reason' was used by the founder's documents. This is not a coincidence.