It's very useful if your Raspberry can trigger events based on time and sunset and sunrise. That's why I did some investigations on this and finaly found two APIs in the internet which allowed me to write a Python script to calculate these values very fast. gneadr found another interesting variant which I modified a bit.
The location calculated is the place where the internetprovider offers the IP address to the client and which can be far away from the actual client location. In my case it's approx 30 km.