In this case `lo` refers 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.