Yes! If you are divorced and not remarried, there is no reason why you should avoid the sacraments. On the contrary, the heartache of divorce is often an excellent opportunity to reconnect with your faith community.
If you have remarried or are cohabiting with a sexual partner, though, you face the same challenges that any person engaging in extra-marital sex faces. The Church asks that those conscious of serious sin do not receive Communion until they have repented and resolved to sin no more. Confession, on the other hand, is always available to those uncertain of their status. When in doubt, ask your parish priest. He is there to help.