Microscopic Theory of the Nematic Phase in Sr3Ru2O7