How to identify genes required for biofilm formation
You could do different things: First you could, as you say yourself, sequence the complete genomes of the strains from a biofilm and compare these with some, which do not form biofilms. This may give you an idea which genes are involved when they are present in the "biofilm genome" but not in the other. The proof would be to disrupt these genes either by removing or mutating them or by gene silencing techniques and see what the outcome is. 

It is also possible that only a mutation in a gene which exists in the sample and the control genome makes the difference. Then site-directed mutagenesis would help to identify the important genes.

The second possibility is that there is no real difference in the sample and the control genome and the difference for developing a biofilm "simply" lies in the difference of gene expression. Then the isolation of RNA (either total or mRNA only) would help to find involved genes. If the environment makes the difference for the development of a biofilm, then the biofilm and the control cells should have show no (or almost no) difference in their gene expression profiles when they are cultivated under identical conditions. You then need to test the gene expression for different environmental conditions (including those that favor the development of biofilms) to find genes which are involved. 

This comparison of the different conditions will then deliver genes which are uniquely or more highly expressed in the biofilm group, a lot of genes which are comparable in expression to the control sample, and some genes which have a lower expression than the control. It is now worth looking at the higher (or unique) and lower expressed genes, find out their function and then start mutating them to check their function for the formation of a biofilm.

Additionally there is the chance that the gene(s) which is necessary for the biofilm formation is located on an extra-chromosomal plasmid. I would also check the plasmids present in the biofilm and the control sample, sequence them (if present) and see which genes they express. The function for the biofilm formation can easily be tested with a simple transformation.