Both are important but weight training is MUCH more effective for fat loss. Here's why
When you do an hour of cardio, you burn X amount of calories.
When you do an hour of weight training, you burn Y amount of calories. However, your metabolic rate is elevated for 48-72 hours after the weight training workout because your body has to rebuild and repair all the muscle you broke down during the workout.
The net calorie burn for weight training is way higher then cardio.