Microphytobenthic (MPB) biofilms in intertidal muddy sediments play important ecological functions in coastal ecosystems. These biofilms are mainly composed of epipelic diatoms but also prokaryotes, with a dominance of bacteria, which excrete diverse extracellular polymeric substances (EPS) according to their environment. While numerous studies have investigated the main components of these EPS matrices via traditional colorimetric assays, their fine composition, notably in specialized metabolites, is still largely unknown. A better chemical characterization of these MPB biofilms is necessary, especially regarding the numerous functions their chemical components play for microorganisms (e.g., motility, cell protection, defense mechanisms, and chemical communication), but also for coastal systems (e.g., primary production, sediment stabilization, larval settlement of some invertebrates with high economical value). An alternative approach to traditional analyses is the use of untargeted metabolomic techniques, which have not yet been applied to such MPB biofilms. The objectives of the present study were to (a) propose a protocol for metabolic fingerprinting by LC-MS and GC-MS for metabolites analysis in polar and non-polar fractions in MPB biofilms extracted from mudflat sediment and to (b) apply this protocol to a case study: the effect of light exposure on the metabolomic fingerprint of the MPB biofilm community. We compared three extraction methods using different mixes of solvents and selected a methanol/chloroform mix (1:1), which gave better results for both techniques and fractions. We then applied the selected protocol to our case study using a short-term light exposure experiment in aquaria (7 days). The present study is the first using a detailed untargeted metabolomic approach on MPB biofilms from mudflat sediment and will provide a solid baseline for further work in this area.