In the evolution of the universe, what caused planets to form?
The birth of a star.
The process of both star formation and planet formation is not entirely clear. However, one theory says that a gravitational wave causes a compression of dust which in turn begins a gravitational field that draws in the lightest material, hydrogen, available to it until a star is formed. That star's gravitational field in turn draws in the heavier material close to it. At this point everything is extremely hot and the particles cling to each other as they orbit the star. This rocky or gaseous bodies continue to collect like material growing planets in the process.
Also, heavy elements expelled by a central star coalesce by piling up on seeds, small mass in-homogeneities caused by collisions and amplified by gravity. The more massive the seed, the more it attracts more mass. In outer regions of proto-stars, heavy elements float a lower temperature to form planets, celestial bodies too cold to radiate. Planets always orbit around a star. Stars don't.