HTTPS make your data transmission secure by encrypting the traffic between the client and the server.
Encryption is only one part of the security when transferring data. The second and similar important part is the authentication, i.e. making sure that you talk to the correct server. And TLS also detects modification of the data on top of encryption. This is necessary since many encryption methods will not realize if the encrypted data got changed but instead simply decrypt these data to something different. Also, TLS allows you to securely generate a unique encryption key for the connection so you don't need to somehow exchange a common secret key to all parties up-front.
Is HTTPS still needed if the username/password is encrypted at the application level?
If all you need to protect are username and password and your protection is as strong as the one from TLS (i.e. strong encryption with unique and not pre-shared key, strong authentication, detection of modifications) then you don't need to use TLS too. But in many scenarios not only username and password are sensitive and need to be protected, but also the contents of the web site might worth being protected (like bank statements, health reports or similar) or even the URL you visit. And protection against modification is also needed, for example in online-banking. Also, often you have no infrastructure to securely exchange the encryption key and relying on a hard-coded key inside the application might be too insecure.
How HTTPS make my data more secure even if I have encryption implemented at the software level?
If everything is already encrypted with the same strength as TLS offers (see last point) then TLS does not add more security.
How do both concepts differ? And how it can be security loophole if one of them is not implemented in a very critical environment?
TLS provides end-to-end encryption between client and server application. With application level encryption you might add additional security if needed, for example by encrypting sensitive information not only during transfer but also at rest (file, database..).
A typical example to see these differences is mail delivery. TLS can be used when delivering the mail between each of the mail transfer agents (MTA). But on each MTA the mail is visible in plain since the TLS connection only protects the transfer between the MTA. If you want to add more security you can use S/MIME of PGP which add application-level encryption. This way the MTA can only see the encrypted mail and it can be decrypted by the final recipient only who has the encryption key (or can compute it).