Preheat the oven to 375 degrees F (190 degrees C). Line a 12-cup muffin tin with liners.
Make the topping: Mix flour and brown sugar together in a bowl. Cut in butter until the mixture resembles pea-sized crumbs.
Make the muffins: Beat sugar and margarine in a large bowl with an electric mixer until light and fluffy. Beat in egg and vanilla.
Mix flour, baking powder, baking soda, and salt together in a separate bowl; gradually beat into butter mixture. Fold in zucchini, cranberries, and walnuts. Spoon batter into the prepared muffin cups, filling nearly to the top. Sprinkle topping over each muffin.
Bake in the preheated oven until a toothpick inserted into the center comes out clean, about 25 minutes.