It's casual language, suitable for informal conversations not formal events or documents. At the reunion, Matt joked that he was ready to leave his job and lead the life of Riley.
Pro Tip 2/3
Cultural Reference
The phrase can hint at one's perception of an easy, comfortable lifestyle, often connected to wealth. Ever since she inherited that villa, she's been living the life of Riley – sailing and sunbathing everyday.
Pro Tip 3/3
Positive Connotation
The phrase usually implies something desirable, often creating a sense of envy or aspiration. He's definitely living the life of Riley with that new sports car and designer clothes.