Yes and no. Yes, sugar cookies can absolutely be made with margarine but no, I would not recommend swapping out the butter in this recipe for margarine. Because margarine and butter contain different levels of fat and have different melting points, swapping out the butter in this recipe for margarine would drastically change the makeup of these cookies and how they bake. If you'd prefer sugar cookies made with margarine, I'd recommend finding a recipe that specifically calls for margarine.