It sounds like you need to hook up a event listener for the click event. See the
event-objects documentation on the main leaflet site for some examples and background.
Your marker creation will probably look something like this:
L.marker([52.2792, -1.5847], {icon: greenIcon}).bindPopup("Warwick Castle.").addTo(map).on('click', function(e) {
alert(e.latlng); // e is an event object (MouseEvent in this case)
map.panTo(e.latlng).zoomIn(1);
});