A Navy TPS board will look at your transcript, review what classes you have taken, and determine whether you meet the minimums and how you stack up to the rest of the applicant pool. Generally, math up through differential equations and at least one physics course is a good rule-of-thumb to start, and it alleviates a lot of the academic struggle if you've seen the math before. However, if you're unsure, it's worth contacting the school for guidance on what you can do to strengthen your application. A technical masters' degree will help a lot, but it isn't required.
NASA also prefers technical majors and requires at least one accredited degree. On the last round of applications, environmental science appeared to fall within that scope. However, if applying as a pilot, a TPS diploma and technical masters' degree have traditionally been the minimum stakes to have a shot (and even that doesn't guarantee an interview).
From the 2016 NASA astronaut candidate position announcement:
"Applicants must meet the following minimum requirements before submitting an application:
1. Bachelor's degree from an accredited institution in engineering, biological science, physical science, computer science, or mathematics.
Notes on Academic Requirements:
Applicants for the Astronaut Candidate Program must meet the basic education requirements for NASA engineering and scientific positions; specifically, successful completion of standard professional curriculum in an accredited college or university leading to at least a bachelor's degree with major study in an appropriate field of engineering, biological science, physical science, computer science, or mathematics.
The following degree fields are not considered qualifying:
--Degrees in Technology (Engineering Technology, Aviation Technology, Medical Technology, etc.)
--Degrees in Psychology (except for Clinical Psychology, Physiological Psychology, or Experimental Psychology, which are qualifying)
--Degrees in Nursing
--Degrees in Exercise Physiology or similar fields
--Degrees in Social Sciences (Geography, Anthropology, Archaeology, etc.)
--Degrees in Aviation, Aviation Management, or similar fields"
Source: USAJobs.gov