Some highly speculative ideas how life may spread in the galaxy, for more info see.
There is even more to the astrobiological potential of rogue planets, however. Not only could they hold microbial life bottled up in their subsurface, they may be able to distribute life throughout the galaxy. In our paper we suggest two ways that this kind of panspermia might occur.
If a wandering planet passes close to a habitable rocky planet within a solar system, the outer layer of the rogue planet might be torn apart by gravitational disturbances, and the resulting debris could end up on the habitable world. Dormant life that had been trapped in the icy shell of the rogue planet may become active again and establish a biosphere on the receiving planet.
Alternatively, the two planets could collide, or come close to colliding. This is generally believed to have a sterilizing effect, as when a Mars-sized object (probably a rogue planet!) collided with the early Earth, resulting in the creation of our Moon. But the distribution of energy and matter during such an event would be very uneven, and some localities might not experience temperatures high enough for sterilization. A common atmosphere may even form, which I think was the case for early Earth and Moon shortly after the cataclysmic impact. Some (dormant) microbial life may survive suspended in such an atmosphere for a long time, before eventually settling down when the surface has cooled off and become more habitable again.