Every time I wake my Macbook it switches applications after wake. How do I fix this?
This Apple Support article overviews a similar issue. This is on a Early 2010 macbook pro, and OP on the linked thread tied the cause to the "require password after 5 minutes" setting in Security and Privacy. OP solved this issue by switching to "require password immediately"

Have you done all updates up to 10.7.5?