Few scenarios what I know when an UE's RRC state moves from CONNECTED to IDLE.
1. UE initiated detach.
2. Network initiated detach for an UE
3. User Inactivity (there is no data exchange between eNodeB and UE).
4. UE moves from serving eNodeB to different eNodeB(target).
As I wrote a number of scenarios, I would like to explain one of the scenario in detail.
Network initiated detach:
Step 1 : MME sends NAS "Detach Request" to UE with optional cause value.
Step 2: UE sends NAS "Detach Accept" to MME.
Step 3: MME releases the resources from other nodes like SGW and PGW and after that it sends S1-AP "UE Context Release Command " message to eNodeB.
Step 4: EnodeB executes RRC Connection Release procedure and once the procedure gets executed it responds to MME with the "UE Context Release Complete" message.