if your goal is strictly to lose weight regardless of how you end up looking then yes.
but you might end up losing the weight in muscle as well and look all messed up.
most people want to lose fat and building muscle can help promote that. so yes, as far as losing weight, diet is more important, as far as building muscle, weightlifting and general resistance training is important. as far as losing fat while retaining muscle (and yes, this applies to women too if they want to look shapely) both are important and have to work in synergy (along with cardio which in the right doses will actually help with your recovery while weightlifting) and sleep (which is probably the MOST underrated piece of the puzzle).