When is three of a kind a valid set in Indian Rummy?
That set is acceptable only in Indian Rummy's three deck variant. (I'll call Indian Rummy by its name Paplu here for some better clarity.)
Two-deck Paplu and regular Rummy only has sets (same card value, different suites) and runs (same suit, sequential card values) and that move isn't legal in this format.
Three-deck Paplu allows the set type you describe, called a tanala:

When three decks are used it is customary also to allow an additional type of combination consisting of three identical cards - such as ♣️10-♣️10-♣️10. This is known as a tanala, and is treated as equivalent to a straight run.
— Pagat's definition of Indian Rummy

The joker is a wild card that can stand in for any other card at all, which means it's legitimate for completing the tanala.