I see that many exchanges allow free transfer internally, that might be because all the addresses arrive from one private key or some criteria like this. Can I implement something like this ? Is it easy to setup ? What do I need to do so?
This has nothing to do with lightening network.
Exchanges stores all bitcoins in their own wallet and only display a number as balance for each of their users. Exchanges can allow user A to send user B some fund without making a real transaction.
Let's say users A and B each has 1 BTC on an exchange and user A sends user B 1 BTC. Since the fund of both users are stored in the exchange own wallet, there is no need to send bitcoin in the blockchain. So, the exchange change balance of user A to zero and balance of user B to 2.