Yes for sure. Black coffee is great for an appetite suppressant. If you normally drink coffee, you should for sure keep drinking it to avoid the caffeine withdrawal - a lot of new fasters get headaches from that and don’t realize it.
Tea is fine as well, however, some people cannot drink tea on an empty stomach without feeling really nauseous (the tannins I think.) I am unfortunately one of these people, so when I fast I generally avoid teas.
If you are fasting mainly to lose weight then yes, it’s fine.
Some argue tea and coffee has some effect on autophagy, there is not much human science to support either way.
I use coffee and tea when I fast, and the effects are good