Most bacteria will adhere to surfaces rather than the water column. A filter thus functions as a safe habitat for bacteria colonisation. Bio-filter media such as those made of ceramics or expanded clay are designed with high porosity and high surface area in mind to provide ample space for microbial colonisation. The main downside of ceramic media is their weight and cost.
Bacteria action for oxidizing ammonia is oxygen dependent (aerobic). So it is not enough to have bacteria, but it is also important to provide enough oxygenated flow to them. Having infinite surface area but no flow isn't efficient for aerobic ammonia oxidizing activity. (conversion of ammonia to nitrates). Compared to sponges, ceramic media (bottom, left) does not compact or get clogged as easily - which maintains good flow of oxygenated water through the media. Specialized media such as K1 media (bottom, middle) which are designed to be used in fluidized bed filters are especially good at this, as are wet/dry filters which have direct contact with air.
Some bio-media take it one step further and are designed to have anaerobic bacteria. Bio-home media for example (bottom, on the right), enables aerobic bacteria to populate the outer surfaces of the media, while the inner portions of the media house anaerobic bacteria. Oxygen is consumed by bacteria on the surface of the media which gives rise to anoxic conditions deeper within. Anaerobic bacteria that lives within then have the ability to reduce Nitrates into Nitrogen gas, which then off gasses into the atmosphere. This type of media can reduce nitrates in a tank, where as conventional media only oxidizes ammonia into nitrates, which then build up over time. (but are easily removed through water changes or consumed by plants).
Are sponge filters good? Filter sponges provide a mix of biological and mechanical filtration. They can work surprisingly well with the main advantage being their cheap cost.
Mechanical filtration aims at physically capturing suspended particulate matter from the water column. Filter sponges differ in mainly in rigidity (cheaply made ones would compress over time), and pore spacing. Large pore spacing is less easily clogged but may not capture fine suspended particles easily. Small pore spacing sponges capture small particulate matter well but is more easily clogged. The main reason for using different types of filter sponges is that placing coarse filter sponges before fine filter sponges allow the coarse sponge to capture larger sized particulate matter which would otherwise clog the fine filter sponge quickly.
Sponges below 30 ppi (pores per inch) are less efficient at mechanical filtration and capturing fine suspended solids. They are good for capturing large particulate matter (uneaten fish food, plant detritus, broken leaves etc) and thus act as pre-filters for finer filter sponges. Sponges above 40 ppi (such as fine filter floss) are very good at capturing small particles; those nearly invisible to the naked eye - but these sponges clog more easily and require more regular servicing - or they should be placed after a pre-filter. If using only 1 type of filter sponge, then choosing a sponge around 30 ppi will generally work well.
Fine filter floss collapses over time; these tend to need to be replaced rather than rinsed out. Unless you replace them regularly, they can clog pretty easily. However, their fine structure captures small particles the best.
Use more ceramic media if you are lazy on maintenance as they do not clog as easily as sponges. They are more costly though. Use finer pored filter sponges if you are very particular on fine particles in the water column - this however requires more regular maintenance. Either way, the compartment for bio-media / biological filtration should come after a compartment that filters off debris - this lets the bio-media compartment remain undisturbed while the compartment that filters off debris can be serviced more regularly. Read here for more principles of layering media in a filter.