In this case "lo" referes to "el dinero" as in English you say for example "I ate the **cake**" or you can say "I ate **it**". In English you say **money** isn't everything -- > **it** isn't everything. Hope you understand my explanation.