It depends on the recipe. While vinegar also has a sour flavor, it wouldn't work in dessert recipes since its sourness generally doesn't blend well with other ingredients. You can replace lemon zest with vinegar for recipes that only need tartness, like salad dressings.