While butter provides the best flavor and texture for sugar cookies, you can use margarine as a substitute. However, keep in mind that the taste and consistency may differ slightly from the original recipe.
Home Can I substitute margarine for butter in the recipe?