The Hindi idiom “काम आना” means “to be useful”. It’s similar to the English expression “to come in useful”, or “to come in handy”.
Consider a few examples:
अगर आप हिंदी सीखना चाहें तो यह किताब काम आएगी – “If you want to learn Hindi, then this book will be useful”
अच्छा हुआ कि मैं छाता लेकर आया. वह बहुत काम आया. “It’s good that I brought an umbrella. It really came in handy!”
The word “उपयोगी” means “useful”, and can be used as an alternative. “काम आना” is less formal.