Somehow I'm in the mood today to enter the fray on this one.
In general, private businesses have the right to refuse to "serve" anyone for any reason, so long as it's not an explicitly prohibited reason. The prohibited reasons are those associated with protected classes. Protected classes are those identified by race, gender, ethnicity, etc. The term "protected class" is a misnomer becuase it does not mean to infer or connote preferred status, but merely that it is unlawful to discriminate against someone for that reason; i.e., treat the person the way you will but keep it independent of race, gender, ethnicity, etc. I also believe that the law re private association is different than in situations where there is a business setting.
Under U.S. federal law, my understanding is that sexual orientation is not a protected class. Depending on the state, my understanding is that some states include sexual orientation as a protected class and others do not.
Assuming that sexual orientation is a protected class in the state where the incident occurred, and assuming that this actually was intended to be a business transaction, then it could well be prohibited to refuse to do business with someone based on sexual orientation. This contrasts with the right to refuse to allow that person into one's home for a visit because of their sexual orientation. Or, for example, the right to refuse to photograph someone as a favor because one did not like their sexual orientation.
As some have commented, this would be no different than someone coming into a store and being refused service for no other reason than that they were black, or a woman, or 58 years old, or ethnically Norweigan.
I happen to fall on the side of supporting the idea that decisions whether to do business with someone must be made independent of sexual orientation. Of course it is difficult to look into others' hearts but I do not see a problem with the law attempting to heighten awareness so that hearts are changed for the better. It certainly would be better all around if, in fact, decisions were not made dependent on sexual orientation.
It has been suggested that this thing could have been avoided if the photographer merely came up with a pretextual reason for his refusal. All I can say is that the law does not have any sense of humour, and it would not be helpful in general if it did. The law expects people to tell the truth, and this person did. It shouldn't go beyond that. It just so happens that the photographer's truth, which they have every right to keep in their head, may not be acted upon in the marketplace.
Every time that the law intervenes in this way, it must be acknowledged that someone's rights are infringed in exchange for other rights being protected. Government is elected to weigh one against the other. Child labour laws and zoning laws are perfect examples in areas that were once very hotly debated.