Yes, same-sex couples can apply if they are legally married. They must be able to provide proof of marriage from the country in which they were married. Note that civil unions and partnerships are not recognized as being the same as marriage. Only married couples can apply to the DV Lottery.
As with heterosexual couples, same-sex couples must include all children on their Green Card Lottery application form.