Pain in tooth comes and goes when I grind or not?

Maybe. When you grind or clench your teeth , you may experience some pain in the morning and dissipates as the day goes on, but intermittent pain like that may be a tooth infection or deep decay, you need to see a dentist before you end up needing a root canal or an extraction.
Get an exam. Have you had the tooth examined by a dentist? The tooth that is hurting could have a cavity. The dentist will need to take an xray and exam to determine the source of your pain. Also, you could be grinding at night or grinding and you are not even aware of it. Please see the dentist to determine the best course of action.
It can. By grinding, you are creating trauma to the tooth. This can lead to soreness of the tooth, but may not be the only cause. Have a dentist evaluate for possible causes.