These files tell JBoss about resources it has to create for / provide to your application. See here and here to get started. Each application server has a specific naming and format for these resource descriptions, in the Sun GF server they're stored in a file called sun-resources.xml.
For resources like datasources and message destinations Netbeans offers you the choice between server resources (pre-existing resources of the required type) and project resources, and it's precisely this last kind of resource that will be stored in the files you found. When you deploy a project, the server will inspect these files and create the required resources if they don't exist.
In my opinion this feature is a bit of a two-edged sword, and I really prefer to work with server resources (that is, the required resources are predefined on the server) when possible. However, for certain test scenarios the ability to create and deploy these resources with very little effort can be a bonus I guess.
EDIT:
I took a quick look at the Netbeans sources and I can now confirm that if there are no resources in the jboss-ds.xml file, it won't be deployed (file creation is skipped if there are no resources).