This is not as simple as it may seem, and although your instinct may be to ban someone, you should first consider the following:
How do you determine what is offensive or not? There are many surnames (last names or family names) that would be considered swear words in English, let alone some other cultures. So you run the very real risk of banning someone for using their legal name. "Bastard" is both a common English surname and a swearword. What do you do with that?
Your site may be one for which freedom of speech falls within the goals of what you do. If Reddit were to ban people for offensive usernames, they would have to ban a huge amount of people. In their case (and some others) banning people for offensive usernames would be plain silly.
You will create a huge potential overhead of administration simply to handle people that believe they have a right not to be offended. Sure, if there are children involved, you may have to do this, but don't underestimate the work that you will add to yourself.
Some names may be ambiguous, and depend on how you read them. #susanalbumparty was a famous twitter hashtag fail which should be read as "susan album party", but many people saw a different reading in it. Or "newsex" was the short name of a company whose full name was "News Extra".
This is not a simple or easy choice. You need to weigh up carefully the impact that this will have on your community and choose accordingly. However, you may find that the best option is simply to contact the person involved and ask them to change their username soto something else.
As a side note here. You will never stop everyone from being offended, and I would argue that within reason you shouldn't have to try to prevent that.
I have a Mexican friend whose name is Jesus, and in Latin America that is perfectly normal. But many people in the USA for example would find someone calling themselves Jesus offensive.