Yes. Madagascar would have been used as a base for Japanese
submarines, which were going to carry out raids across the Indian
Ocean. It's quite possible that had the Allies failed to take
Madagascar, a Japanese version of the German U-Boat campaign in the
Battle of the Atlantic would have taken place in the Indian Ocean.
A second "Battle of the Indian Ocean" could have severed Britain's
links with many of its colonies, which would have had a disastrous
impact in terms of resources.