Do I need to commit .env files into the repository?
Assuming that your .env folder is your virtual environment, no you should not commit it.
The virtual environment should be rebuilt on the server using your requirements.txt file. The local environment you built on your development machine may have operating system specific binaries, and other compiled code that was generated for your local environment. 
The server will have different compiled binaries, and therefore should rebuild the virtual environment using: pip install -r requirements.txt.
I have just started learning backend dev using django. My question is do I just commit the project files in the server folder alone, or should I also commit the .env folder to the repository?
I have done the following:

I have created virtual environment and I have also installed django in venv. 
I have setup a django server and super admin.
I have setup the config.json to protect my API key.
Included the same in .gitignore.

What happens if I do or do not commit .env?