When considering the title question with regards to Leibniz, I found that the Twenty-Four Statements (as titled by Heidegger) supported two different ways of thinking 'nothing'. There was one sense that concerned just that something is actual or not. The other sense of nothing was the privation of goodness in things that were possible; the best of the possibles were the ones that became actual.
The cause (= real ground) of there being something rather than nothing in Leibniz is an absolute being (God), and this being is necessary simply given that there are actual things. There is nothing higher than the absolute being, and so nothing is just privation of what brings something into actuality - relative goodness. Kant determines the thingness of things in a different manner than Leibniz - a manner that does not involve the ethical aspect of life, and the result is very different. For Kant, we are constrained to objects of a possible experience. I will consider, now, how Kant thinks the question of why there is something rather than nothing in terms of the object of possible experience.
In the end of the Appendix to the Analytic of Elements in the Critique of Pure Reason there is a short passage concerned with 'Nothing'. This section begins with the following:
"Before we leave the Transcendental Analytic we must add some remarks which, although in themselves not of special importance, might nevertheless be regarded as requisite for the completeness of the system. The supreme concept with which it is customary to begin a transcendental philosophy is the division into the possible and the impossible. But since all division presupposes a concept to be divided, a still higher one is required, and this is the concept of an object in general, taken problematically, without its having been decided whether it is something or nothing. As the categories are the only concepts which refer to objects in general, the distinguishing of an object, whether it is something or nothing, will proceed according to the order and under the guidance of the categories." (A290 B346)
We can let Kant's discussion of the kinds of nothing stand on its own here, but take up the investigation of the problematic - the merely intelligible object in general which is divided conceptually into the possible and the impossible. The possible is already a something, while the impossible is already a nothing.
The determination of something or nothing is along with the Categories, and the Categories have significance, as we learn in the chapter on the Schematism, as a priori time determinations. The category of possibility means: "the agreement of the synthesis of different representations with the conditions of time in general." (A144 B184) So, if we consider the difference between something and nothing the problematic object which these are divided from, we can see that it is temporality generally that divides them. The problematic object is intelligible while not being in time.
If we ask the question, "why is there something instead of nothing at all?", and try to answer with Kant's conception of nothing, we only get the difference between a thing and the kinds of negations of determinate negations of temporality. There is no answer here. But, as with Leibniz, we can allow ourselves a sense of nothing as negation of 'actuality', and another sense of nothing beyond this sort of negation of something.
For Kant, the problematic is a nothing in more than the sense of negation of something, but in terms of the limits of our theoretical cognition. We could also remark that from the perspective of theoretical reason, Leibniz' 'real ground' would be just as likely absolute Being as it would be absolute Nothing.
If we consider how the problematic can give us an account of question, we can be sure that theoretical reason will have nothing to do with it. Theoretical reason will always send you looking for prior causes forever, which is something we should do, but also cannot answer our question. To get a handle on the answer for our question, we must constrain ourselves to think the problematic in one way or another. Kant gives us the manner in which we do this in his discussion of freedom in the resolution to the third antinomy.
In the third antinomy, Kant is addressing the conflict between a supposed first cause, and the necessity of there always being a prior cause. Kant's resolution is that both sides of this dispute can be true. While we must think everything that happens in terms of something that comes prior, it is not necessary that we think the prior as only appearance. Therefore, we can think something prior in a temporal way - according to an order of nature - and an a-temporal way - according to an order of freedom. But, we cannot arbitrarily decide when to think according to the temporal or not, since cause is a necessary a priori connection of representations. When are we constrained to think in accordance with a cause outside of time? Kant's answer for this is - when we think the moral: when something ought to be.
For Kant, then, the transition to Practical Reason first gives us a determination of the problematic. For theoretical reason, the problematic was indeterminate concerning its being or non-being, but with practical reason we are constrained to think the problematic in terms of being, and so to employ our temporal/theoretical scheme back onto the absolute in order to make it intelligible as a being. This illustrates how the practical determines the noumenal realm in a certain way due to the constraints of our faculties, and so shows how we must operate in relation to the absolute, but at the same time denying any real knowledge of it.
For Kant, the question "why is there something rather than nothing?" is entirely senseless for theoretical reason, but under the constraints of practical reason, the question takes on a significance for us. I not look at the answer that Kant gives to this question, but would rather take some time to consider Leibniz' and Kant's approaches to the question.
For Leibniz, the question already had moral significance, while Kant was restricted at first to a purely theoretical view, from which point the question was senseless, and then showed the transition to the moral view wherein the question takes on sense again. In terms of the ethical being involved in the question, both Kant and Leibniz are in agreement. However, for Leibniz, who didn't clarify the being of beings theoretically, the actual was constrained to be whatever was already the best (highest good), while for Kant, the actual had nothing to do with the good, but rather it was the moral demands placed on us that first allow us to think to the problematic in a determinate way. Kant shows how a system like Leibniz' can first be thought up, which first grounds it critically. I will leave off the fruitful comparison between Kant and Leibniz here.