Yes and no. First, it should be noted that the word "sodomy" refers to a particular sexual act, anal sex, that is frequently associated with homosexual men. In a number of religiously conservative countries, all homosexual conduct is still illegal, including sodomy; in some of these countries (Muslim countries like Iran or Saudi Arabia; or certain African countries like Zimbabwe and Uganda), it is punishable by imprisonment or even death.
In the United States, homosexual activities of all kinds were generally illegal as late as the 1980s in some states, but other states had gradually begun to repeal these laws and decriminalize being gay. By 2003, the Supreme Court ruled that consensual conduct between adults in the privacy of their home should not be a punishable offense. Thus, while gay men continue to be arrested in certain other countries, their private sexual conduct is no longer illegal in the United States.