It's found in lots of places out there-Titan has a lot of methane.It's a simple chemical, the simplest possible hydrocarbon, so it's likely to have been synthesised from its elements wherever they both exist together and conditions are right.
Methane is also widely produced by decomposition of organic waste eg landfill sites by the action of bacteria.It's quite possible that natural gas on Earth consists of some biological and some non biological methane.
ok i see, but how does the reaction happen without bacteria, i know it's abundant by the simple fact that it combines 2 of the most common elements in the universe, hydrogen and carbon. or maybe i am over thinking this, maybe it forms in the protostages of a planet, when it is hotter and pressures can be a lot higher