Dogs open their mouths with tongues out for thermoregulation through panting, communication such as submission or playfulness, tasting their environment, stress or anxiety, or occasionally due to medical problems like dental or neurological issues. If you are concerned, consult your veterinarian.