Snakes that give birth are not somehow more advanced or more evolved than those that lay eggs. Individual snake species evolved to best survive in the situations they have to live with. It is unknown if the first snakes laid eggs or gave birth.