Sunrise and sunset times can be calculated by latitude and longitude. The formula is very complicated, see here.
This site use google maps to search or choose a location on earth. Then the location will be send to our back-end server to perform the calculation.