The function sunrise-sunset is an interactive function takes a numeric prefix argument as a parameter. It does not take the latitude and longitude as parameters, which is what you're trying to pass into it. I suggest reading this emacs wiki article as well as of course the manual itself to learn more about prefix arguments. Also checking out the interactive ...
It looks like you can call it like this:
(let ((calendar-latitude 40.1)
(calendar-location-name "Urbana, IL"))
This does not prompt you for the latitude and longitude, and puts a message in the minibuffer for those variable values.
The answer is given in the doc string of isearch-forward:
If this function is called non-interactively with a nil NO-RECURSIVE-EDIT,
it does not return to the calling function until the search is done.
See the function isearch-mode for more information.
In your first form
(let ((isearch-filter-predicate (lambda (a b) nil)))
I have the function now working to my satisfaction, as below, but am open to suggestions if I'm not doing things optimally. In the solution below, I use function read-file-name to prompt the user, and use condition-case to trap a user response of C-g, the quit signal, so that the default buffer file name is set for the buffer.
(defun my-write-test ()