Four years ago, relations between the Sierra Club and Western ranchers were so strained that some members of the environmental group lobbied to ban grazing on public land. Today, the environmentalists and ranchers have set aside their differences to fight what they consider a common threat: proliferating oil and gas wells.